mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/dl/cfunc.c (rb_dlcfunc_inspect): get rid of overflow.
* ext/dl/closure.c (dlc_callback, rb_dlclosure_init): ditto. * ext/dl/cptr.c (rb_dlptr_s_malloc): ditto. * ext/dl/method.c (rb_dlfunction_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
074836aaca
commit
f953483787
5 changed files with 15 additions and 5 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Wed Feb 17 14:26:30 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/dl/cfunc.c (rb_dlcfunc_inspect): get rid of overflow.
|
||||
|
||||
* ext/dl/closure.c (dlc_callback, rb_dlclosure_init): ditto.
|
||||
|
||||
* ext/dl/cptr.c (rb_dlptr_s_malloc): ditto.
|
||||
|
||||
* ext/dl/method.c (rb_dlfunction_initialize): ditto.
|
||||
|
||||
Wed Feb 17 01:16:12 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* hash.c (hash_update): always raise an exception when adding a new
|
||||
|
|
|
@ -284,7 +284,7 @@ rb_dlcfunc_inspect(VALUE self)
|
|||
{
|
||||
VALUE val;
|
||||
char *str;
|
||||
int str_size;
|
||||
size_t str_size;
|
||||
struct cfunc_data *cfunc;
|
||||
|
||||
TypedData_Get_Struct(self, struct cfunc_data, &dlcfunc_data_type, cfunc);
|
||||
|
|
|
@ -57,7 +57,7 @@ dlc_callback(ffi_cif *cif, void *resp, void **args, void *ctx)
|
|||
VALUE self = (VALUE)ctx;
|
||||
VALUE rbargs = rb_iv_get(self, "@args");
|
||||
VALUE ctype = rb_iv_get(self, "@ctype");
|
||||
int argc = RARRAY_LEN(rbargs);
|
||||
int argc = RARRAY_LENINT(rbargs);
|
||||
VALUE *params = xcalloc(argc, sizeof(VALUE *));
|
||||
VALUE ret;
|
||||
int i, dl_type;
|
||||
|
@ -165,7 +165,7 @@ rb_dlclosure_init(int rbargc, VALUE argv[], VALUE self)
|
|||
if (2 == rb_scan_args(rbargc, argv, "21", &ret, &args, &abi))
|
||||
abi = INT2NUM(FFI_DEFAULT_ABI);
|
||||
|
||||
argc = RARRAY_LEN(args);
|
||||
argc = RARRAY_LENINT(args);
|
||||
|
||||
TypedData_Get_Struct(self, dl_closure, &dlclosure_data_type, cl);
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ static VALUE
|
|||
rb_dlptr_s_malloc(int argc, VALUE argv[], VALUE klass)
|
||||
{
|
||||
VALUE size, sym, obj;
|
||||
int s;
|
||||
long s;
|
||||
freefunc_t f;
|
||||
|
||||
switch (rb_scan_args(argc, argv, "11", &size, &sym)) {
|
||||
|
|
|
@ -91,7 +91,7 @@ rb_dlfunction_initialize(int argc, VALUE argv[], VALUE self)
|
|||
result = ffi_prep_cif (
|
||||
cif,
|
||||
NUM2INT(abi),
|
||||
RARRAY_LEN(args),
|
||||
RARRAY_LENINT(args),
|
||||
DL2FFI_TYPE(NUM2INT(ret_type)),
|
||||
arg_types);
|
||||
|
||||
|
|
Loading…
Reference in a new issue