From a0389b0668256394fef67f081fb3fb86d5cb72b0 Mon Sep 17 00:00:00 2001 From: eregon Date: Thu, 30 Dec 2010 22:54:44 +0100 Subject: [PATCH] define R{ARRAY,STRING}_LENINT if there are not --- ext/cbson/cbson.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/cbson/cbson.c b/ext/cbson/cbson.c index 9b34a7f..d5adb97 100644 --- a/ext/cbson/cbson.c +++ b/ext/cbson/cbson.c @@ -30,10 +30,16 @@ #ifndef RSTRING_LEN # define RSTRING_LEN(v) RSTRING(v)->len #endif +#ifndef RSTRING_LENINT +# define RSTRING_LENINT(v) rb_long2int(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)) +#endif #if HAVE_RUBY_ST_H #include "ruby/st.h"