summaryrefslogtreecommitdiff
path: root/ext/psych
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-08 05:01:33 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-08 05:01:33 +0000
commit3b3c32379820652559f576c7db664f6d57e07a34 (patch)
treecdbc06c9dab5c83be806b7ea9983cb9c882b47a2 /ext/psych
parent86eda6244d3a9ec1d3a76e164f47917bd65ef8a2 (diff)
* ext/psych/psych_emitter.c: bakcport 5bd7744 from tenderlove/psych.
support backword compatibility of Ruby 2.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych')
-rw-r--r--ext/psych/psych_emitter.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/psych/psych_emitter.c b/ext/psych/psych_emitter.c
index 67f54f1..29df96a 100644
--- a/ext/psych/psych_emitter.c
+++ b/ext/psych/psych_emitter.c
@@ -1,5 +1,12 @@
#include <psych.h>
+#if !defined(RARRAY_CONST_PTR)
+#define RARRAY_CONST_PTR(s) (const VALUE *)RARRAY_PTR(s)
+#endif
+#if !defined(RARRAY_AREF)
+#define RARRAY_AREF(a, i) RARRAY_CONST_PTR(a)[i]
+#endif
+
VALUE cPsychEmitter;
static ID id_write;
static ID id_line_width;