summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-11 11:16:56 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-11 11:16:56 +0000
commitc0f0cb22779d2f5eb4747114ed4854b0e6789944 (patch)
treec149ccaa98480882b11cc508c04d2d0b404b60cd /ext
parent36ae466e1e44d523309e4c4a34fb4421f47f792b (diff)
downloadruby-c0f0cb22779d2f5eb4747114ed4854b0e6789944.tar.gz
ruby-c0f0cb22779d2f5eb4747114ed4854b0e6789944.tar.xz
ruby-c0f0cb22779d2f5eb4747114ed4854b0e6789944.zip
bugfix. (Thanks U.Nakamura)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/dl/dl.c6
-rw-r--r--ext/dl/mkcallback.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/dl/dl.c b/ext/dl/dl.c
index dd4f4423b..47cc864a7 100644
--- a/ext/dl/dl.c
+++ b/ext/dl/dl.c
@@ -16,7 +16,7 @@ static ID id_call;
static int
rb_dl_scan_callback_args(long stack[], const char *proto,
- int *argc, VALUE (*argv)[])
+ int *argc, VALUE argv[])
{
int i;
long *sp;
@@ -93,7 +93,7 @@ rb_dl_scan_callback_args(long stack[], const char *proto,
rb_raise(rb_eDLTypeError, "unsupported type `%c'", proto[i]);
break;
}
- (*argv)[i-1] = val;
+ argv[i-1] = val;
}
*argc = (i - 1);
@@ -608,7 +608,7 @@ rb_dl_callback(int argc, VALUE argv[], VALUE self)
rettype = 0x07;
break;
default:
- rb_raise(rb_eDLTypeError, "unsupported type `%s'", STR2CSTR(rettype));
+ rb_raise(rb_eDLTypeError, "unsupported type `%c'", STR2CSTR(type)[0]);
}
entry = -1;
diff --git a/ext/dl/mkcallback.rb b/ext/dl/mkcallback.rb
index 217fef4fb..7738128f5 100644
--- a/ext/dl/mkcallback.rb
+++ b/ext/dl/mkcallback.rb
@@ -33,7 +33,7 @@ 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);",
+ " rb_dl_scan_callback_args(buff, STR2CSTR(proto), &argc, argv);",
" retval = rb_funcall2(proc, id_call, argc, argv);",
"",
ret_code,