Merge pull request #2407 from igordreher/json.destroy_value
Add allocator parameter to `json.detroy_value`
This commit is contained in:
1 file changed
+2
-2
@@ -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 {
|
#partial switch v in value {
|
||||||
case Object:
|
case Object:
|
||||||
for key, elem in v {
|
for key, elem in v {
|
||||||
@@ -104,4 +105,3 @@ destroy_value :: proc(value: Value) {
|
|||||||
delete(v)
|
delete(v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user