summaryrefslogtreecommitdiff
path: root/ext/dl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl')
-rw-r--r--ext/dl/cfunc.c2
-rw-r--r--ext/dl/closure.c4
-rw-r--r--ext/dl/cptr.c2
-rw-r--r--ext/dl/method.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/ext/dl/cfunc.c b/ext/dl/cfunc.c
index aa744d26ec..21afcc5677 100644
--- a/ext/dl/cfunc.c
+++ b/ext/dl/cfunc.c
@@ -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);
diff --git a/ext/dl/closure.c b/ext/dl/closure.c
index da5ade1d87..a2e0b05bb4 100644
--- a/ext/dl/closure.c
+++ b/ext/dl/closure.c
@@ -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);
diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c
index 2598641371..75848f8358 100644
--- a/ext/dl/cptr.c
+++ b/ext/dl/cptr.c
@@ -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)) {
diff --git a/ext/dl/method.c b/ext/dl/method.c
index 8462292d98..1bd0fa8c3e 100644
--- a/ext/dl/method.c
+++ b/ext/dl/method.c
@@ -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);