Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions ext/oj/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ static void dump_sym_obj(VALUE obj, Out out);
static void dump_class_comp(VALUE obj, Out out);
static void dump_class_obj(VALUE obj, Out out);
static void dump_array(VALUE obj, VALUE clas, int depth, Out out);
static int hash_cb_strict(VALUE key, VALUE value, Out out);
static int hash_cb_compat(VALUE key, VALUE value, Out out);
static int hash_cb_object(VALUE key, VALUE value, Out out);
static int hash_cb_strict(VALUE key, VALUE value, VALUE ov);
static int hash_cb_compat(VALUE key, VALUE value, VALUE ov);
static int hash_cb_object(VALUE key, VALUE value, VALUE ov);
static void dump_hash(VALUE obj, VALUE clas, int depth, int mode, Out out);
static void dump_time(VALUE obj, Out out, int withZone);
static void dump_ruby_time(VALUE obj, Out out);
Expand All @@ -92,7 +92,7 @@ static void dump_obj_obj(VALUE obj, int depth, Out out);
static void dump_struct_comp(VALUE obj, int depth, Out out, int argc, VALUE *argv, bool as_ok);
static void dump_struct_obj(VALUE obj, int depth, Out out);
#if HAS_IVAR_HELPERS
static int dump_attr_cb(ID key, VALUE value, Out out);
static int dump_attr_cb(ID key, VALUE value, VALUE ov);
#endif
static void dump_obj_attrs(VALUE obj, VALUE clas, slot_t id, int depth, Out out);
static void dump_odd(VALUE obj, Odd odd, VALUE clas, int depth, Out out);
Expand Down Expand Up @@ -827,7 +827,8 @@ dump_array(VALUE a, VALUE clas, int depth, Out out) {
}

static int
hash_cb_strict(VALUE key, VALUE value, Out out) {
hash_cb_strict(VALUE key, VALUE value, VALUE ov) {
Out out = (Out) ov;
int depth = out->depth;
long size;
int rtype = rb_type(key);
Expand Down Expand Up @@ -893,7 +894,8 @@ hash_cb_strict(VALUE key, VALUE value, Out out) {
}

static int
hash_cb_compat(VALUE key, VALUE value, Out out) {
hash_cb_compat(VALUE key, VALUE value, VALUE ov) {
Out out = (Out) ov;
int depth = out->depth;
long size;

Expand Down Expand Up @@ -960,7 +962,8 @@ hash_cb_compat(VALUE key, VALUE value, Out out) {
}

static int
hash_cb_object(VALUE key, VALUE value, Out out) {
hash_cb_object(VALUE key, VALUE value, VALUE ov) {
Out out = (Out) ov;
int depth = out->depth;
long size = depth * out->indent + 1;

Expand Down Expand Up @@ -1594,7 +1597,8 @@ isRbxHashAttr(const char *attr) {

#if HAS_IVAR_HELPERS
static int
dump_attr_cb(ID key, VALUE value, Out out) {
dump_attr_cb(ID key, VALUE value, VALUE ov) {
Out out = (Out) ov;
int depth = out->depth;
size_t size = depth * out->indent + 1;
const char *attr = rb_id2name(key);
Expand Down
4 changes: 2 additions & 2 deletions lib/oj/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

module Oj
# Current version of the module.
VERSION = '2.18.5'
# Current version of the module.
VERSION = '2.18.6'
end