diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-01-22 10:07:53 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-01-22 10:07:53 +0000 |
commit | 2f99f3b41a4ad5a4efafb0b71784bd05b99d9bba (patch) | |
tree | ec57ed897c38dd660b816f97d30bd762e5fedf44 /object.c | |
parent | 7a249d7acca6f78607e45282e2a0d9be03b9acfb (diff) |
use STR2CSTR
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@46 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -721,6 +721,15 @@ f_string(obj, arg) return rb_funcall(arg, rb_intern("to_s"), 0); } +char* +str2cstr(str) + VALUE str; +{ + if (NIL_P(str)) return NULL; + Check_Type(str, T_STRING); + return RSTRING(str)->ptr; +} + VALUE rb_String(val) VALUE val; |