summaryrefslogtreecommitdiff
path: root/ext/json/generator
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/generator')
-rw-r--r--ext/json/generator/depend2
-rw-r--r--ext/json/generator/generator.c2
-rw-r--r--ext/json/generator/generator.h21
3 files changed, 2 insertions, 23 deletions
diff --git a/ext/json/generator/depend b/ext/json/generator/depend
index 1f0ea0a624e..1a042a2501e 100644
--- a/ext/json/generator/depend
+++ b/ext/json/generator/depend
@@ -1 +1 @@
-generator.o: generator.c generator.h $(srcdir)/../fbuffer/fbuffer.h $(ruby_headers)
+generator.o: generator.c generator.h $(srcdir)/../fbuffer/fbuffer.h
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
index b1babb15f32..3cff87d7d5c 100644
--- a/ext/json/generator/generator.c
+++ b/ext/json/generator/generator.c
@@ -864,7 +864,7 @@ static int isArrayOrObject(VALUE string)
if (string_len < 2) return 0;
for (; p < q && isspace(*p); p++);
for (; q > p && isspace(*q); q--);
- return *p == '[' && *q == ']' || *p == '{' && *q == '}';
+ return (*p == '[' && *q == ']') || (*p == '{' && *q == '}');
}
/*
diff --git a/ext/json/generator/generator.h b/ext/json/generator/generator.h
index 901b62c251a..7d429d512c3 100644
--- a/ext/json/generator/generator.h
+++ b/ext/json/generator/generator.h
@@ -16,27 +16,6 @@
#define option_given_p(opts, key) RTEST(rb_funcall(opts, i_key_p, 1, key))
-#ifndef RHASH_SIZE
-#define RHASH_SIZE(hsh) (RHASH(hsh)->tbl->num_entries)
-#endif
-
-#ifndef RFLOAT_VALUE
-#define RFLOAT_VALUE(val) (RFLOAT(val)->value)
-#endif
-
-#ifndef RARRAY_PTR
-#define RARRAY_PTR(ARRAY) RARRAY(ARRAY)->ptr
-#endif
-#ifndef RARRAY_LEN
-#define RARRAY_LEN(ARRAY) RARRAY(ARRAY)->len
-#endif
-#ifndef RSTRING_PTR
-#define RSTRING_PTR(string) RSTRING(string)->ptr
-#endif
-#ifndef RSTRING_LEN
-#define RSTRING_LEN(string) RSTRING(string)->len
-#endif
-
/* unicode defintions */
#define UNI_STRICT_CONVERSION 1