aboutsummaryrefslogtreecommitdiff
path: root/core/encoding
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2023-03-25 07:33:34 +0100
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2023-03-25 07:33:34 +0100
commit4c13dee18f66df37d19188659d7573ab7a8e97c6 (patch)
treec2a2598cba297b7f04f30b55269a799894a310cc /core/encoding
parent95497626e3e86a1355c04554906df1f6bce88051 (diff)
Update types.odin
Use `context.allocator := allocator` idiom.
Diffstat (limited to 'core/encoding')
-rw-r--r--core/encoding/json/types.odin12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/encoding/json/types.odin b/core/encoding/json/types.odin
index e43659948..57daaafef 100644
--- a/core/encoding/json/types.odin
+++ b/core/encoding/json/types.odin
@@ -88,20 +88,20 @@ Error :: enum {
destroy_value :: proc(value: Value, allocator := context.allocator) {
+ context.allocator := allocator
#partial switch v in value {
case Object:
for key, elem in v {
- delete(key, allocator)
- destroy_value(elem, allocator)
+ delete(key)
+ destroy_value(elem)
}
delete(v)
case Array:
for elem in v {
- destroy_value(elem, allocator)
+ destroy_value(elem)
}
delete(v)
case String:
- delete(v, allocator)
+ delete(v)
}
-}
-
+} \ No newline at end of file