diff --git a/ext/cbson/cbson.c b/ext/cbson/cbson.c index d5adb97..3f15a32 100644 --- a/ext/cbson/cbson.c +++ b/ext/cbson/cbson.c @@ -31,14 +31,14 @@ # define RSTRING_LEN(v) RSTRING(v)->len #endif #ifndef RSTRING_LENINT -# define RSTRING_LENINT(v) rb_long2int(RSTRING_LEN(v)) +# define RSTRING_LENINT(v) (int)(RSTRING_LEN(v)) #endif #ifndef RARRAY_LEN # define RARRAY_LEN(v) RARRAY(v)->len #endif #ifndef RARRAY_LENINT -# define RARRAY_LENINT(v) rb_long2int(RARRAY_LEN(v)) +# define RARRAY_LENINT(v) (int)(RARRAY_LEN(v)) #endif #if HAVE_RUBY_ST_H