Hi Anatol,

----- Original Message -----
From: "Anatol Belski"
Sent: Tuesday, August 18, 2015

Ok, got the idea now. But sizeof(size_t) is always >
sizeof(zend_long). And for signed, still it is simpler and safer to
just use an #ifdef around.

No, == like I said. :-) OK, just saw your correction (max instead of sizeof); but we're never comparing a size_t with zend_long, so it doesn't matter.

I don't know where you're getting zend_long from anyway. [U]INT_MAX is an int, not zend_long...

The check in the macro, that the compiler can remove, should be fine in all cases (even if *int* was 64-bit).

I don't see how it's simpler or safer to use #if.

But actually, if #if was used, should really be checking SIZE_MAX > UINT_MAX I guess, and ZEND_LONG_MAX > INT_MAX.

But using sizeof() in the macro definition gives the same result...

- Matt

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to