@@ -403,7 +403,7 @@ static zend_always_inline zend_ulong zend_rotr3(zend_ulong key)
403
403
int zend_shared_memdup_size (void * source , size_t size )
404
404
{
405
405
void * old_p ;
406
- zend_ulong key = (zend_ulong )source ;
406
+ zend_ulong key = (zend_ulong )( uintptr_t ) source ;
407
407
408
408
key = zend_rotr3 (key );
409
409
if ((old_p = zend_hash_index_find_ptr (& ZCG (xlat_table ), key )) != NULL ) {
@@ -420,7 +420,7 @@ static zend_always_inline void *_zend_shared_memdup(void *source, size_t size, b
420
420
zend_ulong key ;
421
421
422
422
if (get_xlat ) {
423
- key = (zend_ulong )source ;
423
+ key = (zend_ulong )( uintptr_t ) source ;
424
424
key = zend_rotr3 (key );
425
425
if ((old_p = zend_hash_index_find_ptr (& ZCG (xlat_table ), key )) != NULL ) {
426
426
/* we already duplicated this pointer */
@@ -432,7 +432,7 @@ static zend_always_inline void *_zend_shared_memdup(void *source, size_t size, b
432
432
memcpy (retval , source , size );
433
433
if (set_xlat ) {
434
434
if (!get_xlat ) {
435
- key = (zend_ulong )source ;
435
+ key = (zend_ulong )( uintptr_t ) source ;
436
436
key = zend_rotr3 (key );
437
437
}
438
438
zend_hash_index_add_new_ptr (& ZCG (xlat_table ), key , retval );
@@ -575,7 +575,7 @@ void zend_shared_alloc_restore_xlat_table(uint32_t checkpoint)
575
575
576
576
void zend_shared_alloc_register_xlat_entry (const void * key_pointer , const void * value )
577
577
{
578
- zend_ulong key = (zend_ulong )key_pointer ;
578
+ zend_ulong key = (zend_ulong )( uintptr_t ) key_pointer ;
579
579
580
580
key = zend_rotr3 (key );
581
581
zend_hash_index_add_new_ptr (& ZCG (xlat_table ), key , (void * )value );
@@ -584,7 +584,7 @@ void zend_shared_alloc_register_xlat_entry(const void *key_pointer, const void *
584
584
void * zend_shared_alloc_get_xlat_entry (const void * key_pointer )
585
585
{
586
586
void * retval ;
587
- zend_ulong key = (zend_ulong )key_pointer ;
587
+ zend_ulong key = (zend_ulong )( uintptr_t ) key_pointer ;
588
588
589
589
key = zend_rotr3 (key );
590
590
if ((retval = zend_hash_index_find_ptr (& ZCG (xlat_table ), key )) == NULL ) {
0 commit comments