From 77775e385fe92d1309c65c585b4643712c58e5ba Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 7 Jan 2012 11:15:37 +0000 Subject: [PATCH] define RARRAY_PTR/RARRAY_LEN macros for Ruby 1.8.6 Apparently Ruby 1.8.6 is still in use... --- ext/kgio/ancient_ruby.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/kgio/ancient_ruby.h b/ext/kgio/ancient_ruby.h index e85ee60..cda0917 100644 --- a/ext/kgio/ancient_ruby.h +++ b/ext/kgio/ancient_ruby.h @@ -17,4 +17,11 @@ static void my_str_set_len(VALUE str, long len) # define RSTRING_LEN(s) (RSTRING(s)->len) #endif /* !defined(RSTRING_LEN) */ +#ifndef RARRAY_PTR +# define RARRAY_PTR(s) (RARRAY(s)->ptr) +#endif /* !defined(RARRAY_PTR) */ +#ifndef RARRAY_LEN +# define RARRAY_LEN(s) (RARRAY(s)->len) +#endif /* !defined(RARRAY_LEN) */ + #endif /* MISSING_ANCIENT_RUBY_H */ -- 2.11.4.GIT