summaryrefslogtreecommitdiff
path: root/ext/json/generator/generator.h
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-30 02:23:12 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-30 02:23:12 +0000
commitb14c060ddabfad99deff3e56d847034f7d0946be (patch)
treec3ac0ee69619b22e2cf3f9c29bbe5ae4005a3b4c /ext/json/generator/generator.h
parent2dd9d721ed6820a584654c82f4ae1d6331f78a9e (diff)
* ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).
[Bug #5173] [ruby-core:38866] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/json/generator/generator.h')
-rw-r--r--ext/json/generator/generator.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/json/generator/generator.h b/ext/json/generator/generator.h
index ee496fe2211..f882ea004b0 100644
--- a/ext/json/generator/generator.h
+++ b/ext/json/generator/generator.h
@@ -45,7 +45,10 @@
#define RSTRING_LEN(string) RSTRING(string)->len
#endif
-#define RSTRING_PAIR(string) RSTRING_PTR(string), RSTRING_LEN(string)
+/* We don't need to guard objects for rbx, so let's do nothing at all. */
+#ifndef RB_GC_GUARD
+#define RB_GC_GUARD(object)
+#endif
/* fbuffer implementation */
@@ -123,6 +126,7 @@ typedef struct JSON_Generator_StateStruct {
long max_nesting;
char allow_nan;
char ascii_only;
+ char quirks_mode;
long depth;
} JSON_Generator_State;