summaryrefslogtreecommitdiffstats
path: root/ext/dl/mkcallback.rb
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-11 14:44:53 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-11 14:44:53 +0000
commit8741d5e339032ea8794d5fc78d6061645b67c388 (patch)
tree1606e5b4cce23b294c984705c2c5c92c5e4513f3 /ext/dl/mkcallback.rb
parentc0f0cb22779d2f5eb4747114ed4854b0e6789944 (diff)
downloadruby-8741d5e339032ea8794d5fc78d6061645b67c388.tar.gz
ruby-8741d5e339032ea8794d5fc78d6061645b67c388.tar.xz
ruby-8741d5e339032ea8794d5fc78d6061645b67c388.zip
Get rid of STR2CSTR. (Thanks N.Nakada)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/mkcallback.rb')
-rw-r--r--ext/dl/mkcallback.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/dl/mkcallback.rb b/ext/dl/mkcallback.rb
index 7738128f5..9a1218473 100644
--- a/ext/dl/mkcallback.rb
+++ b/ext/dl/mkcallback.rb
@@ -33,7 +33,8 @@ def mkfunc(rettype, fnum, argc)
" obj = rb_hash_aref(DLFuncTable, rb_assoc_new(INT2NUM(#{rettype.to_s}),INT2NUM(#{fnum.to_s})));",
" proto = rb_ary_entry(obj, 0);",
" proc = rb_ary_entry(obj, 1);",
- " rb_dl_scan_callback_args(buff, STR2CSTR(proto), &argc, argv);",
+ " Check_Type(proto, T_STRING);",
+ " rb_dl_scan_callback_args(buff, RSTRING(proto)->ptr, &argc, argv);",
" retval = rb_funcall2(proc, id_call, argc, argv);",
"",
ret_code,