platform/shared/ruby/include/ruby/ruby.h in rhodes-3.0.2 vs platform/shared/ruby/include/ruby/ruby.h in rhodes-3.1.0.beta.1

- old
+ new

@@ -112,10 +112,11 @@ #define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o" #define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u" #define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x" #define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X" +# define PRI_SIZE_PREFIX #if SIZEOF_SIZE_T == SIZEOF_INT # define PRI_SIZE_PREFIX #elif SIZEOF_SIZE_T == SIZEOF_LONG # define PRI_SIZE_PREFIX "l" #elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG @@ -459,19 +460,21 @@ # define UINT2NUM(v) LONG2FIX((unsigned int)(v)) #else static inline VALUE INT2NUM(int v) { - if (!FIXABLE(v)) - return rb_int2big(v); + long vv = v; + if (!FIXABLE(vv)) + return rb_int2big(v); return INT2FIX(v); } static inline VALUE UINT2NUM(unsigned int v) { - if (!POSFIXABLE(v)) - return rb_uint2big(v); + unsigned long vv = v; + if (!POSFIXABLE(vv)) + return rb_uint2big(v); return LONG2FIX(v); } #endif static inline VALUE