Use consistent type for h on call zend_hash_index_* - #19255
Conversation
|
changes look correct to me cc @nielsdos |
ndossche
left a comment
There was a problem hiding this comment.
The changes are right, although also kinda not necessary at this point.
dstogov
left a comment
There was a problem hiding this comment.
Adding (uintptr_t) makes sense too eliminate warnings.
I'm not sure if changes between long/ulong make sense.
Probably, it would be better to use zend_long argument in first place, because we may work with negative indexes.
@dstogov What do you think? |
|
I didn't propose converting prototypes. I told that changes cast from |
zend_hash_index_*expectszend_ulongfor thehargument but often this argument got casted tozend_long(instead ofzend_ulong.Additionally, most of the time, a pointer first got casted to
(uintptr_t)before(zend_ulong)but sometimes a pointer got casted directly. I noticed this during my work of #19079 as it fails if the pointer size andzend_ulongdiffers.