mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
bugfix. (Thanks U.Nakamura)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7f80a1800f
commit
176542da7f
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue