Skip to content

Commit b325d01

Browse files
committed
hash: xxhash: Fix build after xxHash 0.8.3 upgrade
The xxHash 0.8.3 upgrade renamed the `memsize` member to `bufferedSize` in XXH32_state_s and XXH64_state_s. Signed-off-by: Anatol Belski <ab@php.net>
1 parent aff38f8 commit b325d01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/hash/hash_xxhash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static hash_spec_result php_hash_xxh32_unserialize(
8282
hash_spec_result r = HASH_SPEC_FAILURE;
8383
if (magic == PHP_HASH_SERIALIZE_MAGIC_SPEC
8484
&& (r = php_hash_unserialize_spec(hash, zv, PHP_XXH32_SPEC)) == HASH_SPEC_SUCCESS
85-
&& ctx->s.memsize < 16) {
85+
&& ctx->s.bufferedSize < 16) {
8686
return HASH_SPEC_SUCCESS;
8787
}
8888

@@ -238,7 +238,7 @@ static hash_spec_result php_hash_xxh64_unserialize(
238238
hash_spec_result r = HASH_SPEC_FAILURE;
239239
if (magic == PHP_HASH_SERIALIZE_MAGIC_SPEC
240240
&& (r = php_hash_unserialize_spec(hash, zv, PHP_XXH64_SPEC)) == HASH_SPEC_SUCCESS
241-
&& ctx->s.memsize < 32) {
241+
&& ctx->s.bufferedSize < 32) {
242242
return HASH_SPEC_SUCCESS;
243243
}
244244

0 commit comments

Comments
 (0)