|
@@ -422,19 +422,17 @@ unmarshal_object :: proc(p: ^Parser, v: any, end_token: Token_Kind) -> (err: Unm
|
|
delete(key, p.allocator)
|
|
delete(key, p.allocator)
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
-
|
|
|
|
- hash := runtime.Map_Hash {
|
|
|
|
- hash = runtime.default_hasher_string(&key, 0),
|
|
|
|
- key_ptr = &key,
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ key_hash := runtime.default_hasher_string(&key, 0)
|
|
|
|
+ key_ptr := rawptr(&key)
|
|
|
|
+
|
|
key_cstr: cstring
|
|
key_cstr: cstring
|
|
if reflect.is_cstring(t.key) {
|
|
if reflect.is_cstring(t.key) {
|
|
key_cstr = cstring(raw_data(key))
|
|
key_cstr = cstring(raw_data(key))
|
|
- hash.key_ptr = &key_cstr
|
|
|
|
|
|
+ key_ptr = &key_cstr
|
|
}
|
|
}
|
|
|
|
|
|
- set_ptr := runtime.__dynamic_map_set(header, hash, map_backing_value.data)
|
|
|
|
|
|
+ set_ptr := runtime.__dynamic_map_set(header, key_hash, key_ptr, map_backing_value.data)
|
|
if set_ptr == nil {
|
|
if set_ptr == nil {
|
|
delete(key, p.allocator)
|
|
delete(key, p.allocator)
|
|
}
|
|
}
|