Skip to content

Commit

Permalink
Fix HASH_BUILDER using default values
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Aug 7, 2023
1 parent caae033 commit 76505d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/typeref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ pub fn init_typerefs() {
assert!(crate::deserialize::KEY_MAP
.set(crate::deserialize::KeyMap::default())
.is_ok());
HASH_BUILDER.get_or_init(ahash_init);
FRAGMENT_TYPE = orjson_fragmenttype_new();
PyDateTime_IMPORT();
NONE = Py_None();
Expand Down Expand Up @@ -188,6 +187,9 @@ pub fn init_typerefs() {
JsonEncodeError = pyo3_ffi::PyExc_TypeError;
Py_INCREF(JsonEncodeError);
JsonDecodeError = look_up_json_exc();

// after all type lookups
HASH_BUILDER.get_or_init(ahash_init);
});
}

Expand Down

0 comments on commit 76505d4

Please sign in to comment.