@@ -403,7 +403,7 @@ static zend_always_inline zend_ulong zend_rotr3(zend_ulong key)
403403int zend_shared_memdup_size (void * source , size_t size )
404404{
405405 void * old_p ;
406- zend_ulong key = (zend_ulong )source ;
406+ zend_ulong key = (zend_ulong )( uintptr_t ) source ;
407407
408408 key = zend_rotr3 (key );
409409 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
420420 zend_ulong key ;
421421
422422 if (get_xlat ) {
423- key = (zend_ulong )source ;
423+ key = (zend_ulong )( uintptr_t ) source ;
424424 key = zend_rotr3 (key );
425425 if ((old_p = zend_hash_index_find_ptr (& ZCG (xlat_table ), key )) != NULL ) {
426426 /* we already duplicated this pointer */
@@ -432,7 +432,7 @@ static zend_always_inline void *_zend_shared_memdup(void *source, size_t size, b
432432 memcpy (retval , source , size );
433433 if (set_xlat ) {
434434 if (!get_xlat ) {
435- key = (zend_ulong )source ;
435+ key = (zend_ulong )( uintptr_t ) source ;
436436 key = zend_rotr3 (key );
437437 }
438438 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)
575575
576576void zend_shared_alloc_register_xlat_entry (const void * key_pointer , const void * value )
577577{
578- zend_ulong key = (zend_ulong )key_pointer ;
578+ zend_ulong key = (zend_ulong )( uintptr_t ) key_pointer ;
579579
580580 key = zend_rotr3 (key );
581581 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 *
584584void * zend_shared_alloc_get_xlat_entry (const void * key_pointer )
585585{
586586 void * retval ;
587- zend_ulong key = (zend_ulong )key_pointer ;
587+ zend_ulong key = (zend_ulong )( uintptr_t ) key_pointer ;
588588
589589 key = zend_rotr3 (key );
590590 if ((retval = zend_hash_index_find_ptr (& ZCG (xlat_table ), key )) == NULL ) {
0 commit comments