aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2023-03-25 07:34:01 +0100
committerGitHub <noreply@github.com>2023-03-25 07:34:01 +0100
commit3e1daa002cc13fdac4e9799fd350f4b83c628c22 (patch)
treec2a2598cba297b7f04f30b55269a799894a310cc
parent9ada48054fa3dfe01665189f92f7bbc16ff1aaeb (diff)
parent4c13dee18f66df37d19188659d7573ab7a8e97c6 (diff)
Merge pull request #2407 from igordreher/json.destroy_value
Add allocator parameter to `json.detroy_value`
-rw-r--r--core/encoding/json/types.odin6
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