ext/oj/dump_leaf.c in oj-3.0.0 vs ext/oj/dump_leaf.c in oj-3.0.1

- old
+ new

@@ -8,12 +8,10 @@ #include "oj.h" #include "dump.h" static void dump_leaf(Leaf leaf, int depth, Out out); -extern void dump_cstr(const char *str, size_t cnt, int is_sym, int escape1, Out out); - static void grow(Out out, size_t len) { size_t size = out->end - out->buf; long pos = out->cur - out->buf; char *buf; @@ -50,14 +48,14 @@ static void dump_leaf_str(Leaf leaf, Out out) { switch (leaf->value_type) { case STR_VAL: - dump_cstr(leaf->str, strlen(leaf->str), 0, 0, out); + oj_dump_cstr(leaf->str, strlen(leaf->str), 0, 0, out); break; case RUBY_VAL: - dump_cstr(rb_string_value_cstr(&leaf->value), RSTRING_LEN(leaf->value), 0, 0, out); + oj_dump_cstr(rb_string_value_cstr(&leaf->value), RSTRING_LEN(leaf->value), 0, 0, out); break; case COL_VAL: default: rb_raise(rb_eTypeError, "Unexpected value type %02x.\n", leaf->value_type); break; @@ -158,10 +156,10 @@ do { if (out->end - out->cur <= (long)size) { grow(out, size); } fill_indent(out, d2); - dump_cstr(e->key, strlen(e->key), 0, 0, out); + oj_dump_cstr(e->key, strlen(e->key), 0, 0, out); *out->cur++ = ':'; dump_leaf(e, d2, out); if (e->next != first) { *out->cur++ = ','; }