Skip to content

Commit

Permalink
Initialize saj2 fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ohler55 committed Jan 31, 2023
1 parent a6404ca commit 44ba329
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 3.14.1 - unreleased

- Fixed issue with uninitialized handler for Oj::Parser::Saj.

## 3.14.0 - 2022-01-30

- Tracing is now a compile time option giving a 15 to 20% performance boost.
Expand Down
4 changes: 4 additions & 0 deletions ext/oj/saj2.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,11 @@ void oj_init_saj(ojParser p, Saj d) {
d->klen = 256;
d->keys = ALLOC_N(VALUE, d->klen);
d->tail = d->keys;
d->handler = Qnil;
d->str_cache = cache_create(0, form_str, true, false);
d->cache_str = 16;
d->cache_keys = true;
d->thread_safe = false;

p->ctx = (void *)d;
reset(p);
Expand Down
2 changes: 1 addition & 1 deletion 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 = '3.14.0'
VERSION = '3.14.1'
end

0 comments on commit 44ba329

Please sign in to comment.