about summary refs log tree commit homepage
path: root/ext/clogger_ext/ruby_1_9_compat.h
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-25 00:58:03 -0800
committerEric Wong <normalperson@yhbt.net>2010-12-25 00:58:03 -0800
commit66a5374e724612cd16f270f43102a6ed347208d7 (patch)
treef012a8dc33a51109cf01b8d7111dfe34dbfce025 /ext/clogger_ext/ruby_1_9_compat.h
parentcd91b34636caabb3a1a7cee38f5b84e91eaf62b8 (diff)
downloadclogger-66a5374e724612cd16f270f43102a6ed347208d7.tar.gz
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.
Diffstat (limited to 'ext/clogger_ext/ruby_1_9_compat.h')
-rw-r--r--ext/clogger_ext/ruby_1_9_compat.h12
1 files changed, 7 insertions, 5 deletions
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