From 66a5374e724612cd16f270f43102a6ed347208d7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 25 Dec 2010 00:58:03 -0800 Subject: add support for Rubinius RSTRUCT_PTR access is unlikely to ever happen for Rubinius, so we'll just make a method dispatch and leave the faster code for Ruby 1.8 and 1.9. --- ext/clogger_ext/ruby_1_9_compat.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ext/clogger_ext/ruby_1_9_compat.h') diff --git a/ext/clogger_ext/ruby_1_9_compat.h b/ext/clogger_ext/ruby_1_9_compat.h index b6caa96..ef103e4 100644 --- a/ext/clogger_ext/ruby_1_9_compat.h +++ b/ext/clogger_ext/ruby_1_9_compat.h @@ -11,11 +11,13 @@ #ifndef RARRAY_LEN # define RARRAY_LEN(s) (RARRAY(s)->len) #endif -#ifndef RSTRUCT_PTR -# define RSTRUCT_PTR(s) (RSTRUCT(s)->ptr) -#endif -#ifndef RSTRUCT_LEN -# define RSTRUCT_LEN(s) (RSTRUCT(s)->len) +#ifndef RUBINIUS +# ifndef RSTRUCT_PTR +# define RSTRUCT_PTR(s) (RSTRUCT(s)->ptr) +# endif +# ifndef RSTRUCT_LEN +# define RSTRUCT_LEN(s) (RSTRUCT(s)->len) +# endif #endif #ifndef HAVE_RB_STR_SET_LEN -- cgit v1.2.3-24-ge0c7