summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-22 10:07:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-22 10:07:53 +0000
commit2f99f3b41a4ad5a4efafb0b71784bd05b99d9bba (patch)
treeec57ed897c38dd660b816f97d30bd762e5fedf44 /object.c
parent7a249d7acca6f78607e45282e2a0d9be03b9acfb (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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/object.c b/object.c
index faf6983526..be551bd82a 100644
--- a/object.c
+++ b/object.c
@@ -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;