mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Fix free bug not using the correct allocator
This commit is contained in:
@@ -129,7 +129,7 @@ XXH3_create_state :: proc(allocator := context.allocator) -> (res: ^XXH3_state,
|
|||||||
}
|
}
|
||||||
|
|
||||||
XXH3_destroy_state :: proc(state: ^XXH3_state, allocator := context.allocator) -> (err: Error) {
|
XXH3_destroy_state :: proc(state: ^XXH3_state, allocator := context.allocator) -> (err: Error) {
|
||||||
free(state)
|
free(state, allocator)
|
||||||
return .None
|
return .None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,15 +19,15 @@ xxh_u32 :: u32
|
|||||||
XXH32_DEFAULT_SEED :: XXH32_hash(0)
|
XXH32_DEFAULT_SEED :: XXH32_hash(0)
|
||||||
|
|
||||||
XXH32_state :: struct {
|
XXH32_state :: struct {
|
||||||
total_len_32: XXH32_hash, /*!< Total length hashed, modulo 2^32 */
|
total_len_32: XXH32_hash, /*!< Total length hashed, modulo 2^32 */
|
||||||
large_len: XXH32_hash, /*!< Whether the hash is >= 16 (handles @ref total_len_32 overflow) */
|
large_len: XXH32_hash, /*!< Whether the hash is >= 16 (handles @ref total_len_32 overflow) */
|
||||||
v1: XXH32_hash, /*!< First accumulator lane */
|
v1: XXH32_hash, /*!< First accumulator lane */
|
||||||
v2: XXH32_hash, /*!< Second accumulator lane */
|
v2: XXH32_hash, /*!< Second accumulator lane */
|
||||||
v3: XXH32_hash, /*!< Third accumulator lane */
|
v3: XXH32_hash, /*!< Third accumulator lane */
|
||||||
v4: XXH32_hash, /*!< Fourth accumulator lane */
|
v4: XXH32_hash, /*!< Fourth accumulator lane */
|
||||||
mem32: [4]XXH32_hash, /*!< Internal buffer for partial reads. Treated as unsigned char[16]. */
|
mem32: [4]XXH32_hash, /*!< Internal buffer for partial reads. Treated as unsigned char[16]. */
|
||||||
memsize: XXH32_hash, /*!< Amount of data in @ref mem32 */
|
memsize: XXH32_hash, /*!< Amount of data in @ref mem32 */
|
||||||
reserved: XXH32_hash, /*!< Reserved field. Do not read or write to it, it may be removed. */
|
reserved: XXH32_hash, /*!< Reserved field. Do not read or write to it, it may be removed. */
|
||||||
}
|
}
|
||||||
|
|
||||||
XXH32_canonical :: struct {
|
XXH32_canonical :: struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user