THRIFT-408. rb: Ruby C extension doesn't build on 1.8.5
This patch redefines the important macros so 1.8.5 is compatible.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758517 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/ext/macros.h b/lib/rb/ext/macros.h
index 6dbb7ad..8e1f343 100644
--- a/lib/rb/ext/macros.h
+++ b/lib/rb/ext/macros.h
@@ -26,4 +26,16 @@
#ifndef RFLOAT_VALUE
# define RFLOAT_VALUE(v) RFLOAT(rb_Float(v))->value
+#endif
+
+#ifndef RSTRING_LEN
+# define RSTRING_LEN(v) RSTRING(rb_String(v))->len
+#endif
+
+#ifndef RSTRING_PTR
+# define RSTRING_PTR(v) RSTRING(rb_String(v))->ptr
+#endif
+
+#ifndef RARRAY_LEN
+# define RARRAY_LEN(v) RARRAY(rb_Array(v))->len
#endif
\ No newline at end of file