define R{ARRAY,STRING}_LENINT if there are not

This commit is contained in:
eregon 2010-12-30 22:54:44 +01:00 committed by Kyle Banker
parent 3ab2acbf4f
commit a0389b0668
1 changed files with 6 additions and 0 deletions

View File

@ -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"