diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-03-25 07:34:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-25 07:34:01 +0100 |
| commit | 3e1daa002cc13fdac4e9799fd350f4b83c628c22 (patch) | |
| tree | c2a2598cba297b7f04f30b55269a799894a310cc | |
| parent | 9ada48054fa3dfe01665189f92f7bbc16ff1aaeb (diff) | |
| parent | 4c13dee18f66df37d19188659d7573ab7a8e97c6 (diff) | |
Merge pull request #2407 from igordreher/json.destroy_value
Add allocator parameter to `json.detroy_value`
| -rw-r--r-- | core/encoding/json/types.odin | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/encoding/json/types.odin b/core/encoding/json/types.odin index 468774aa9..57daaafef 100644 --- a/core/encoding/json/types.odin +++ b/core/encoding/json/types.odin @@ -87,7 +87,8 @@ Error :: enum { -destroy_value :: proc(value: Value) { +destroy_value :: proc(value: Value, allocator := context.allocator) { + context.allocator := allocator #partial switch v in value { case Object: for key, elem in v { @@ -103,5 +104,4 @@ destroy_value :: proc(value: Value) { case String: delete(v) } -} - +}
\ No newline at end of file |