On Mon, 2011-01-24 at 19:11 +0000, Gustavo Lopes wrote: > Hum? Pierre's change is "correct", but it's also redundant. > > Please read the C FAQ: http://c-faq.com/null/ptrtest.html > > What would be invalid would be testing for a null pointer with something > like this: > > void *p; > ... > int a = 0; > if (p == (void*)a) { } > > Because "a" is not "a constant integer expression with value 0" (not to > mention, integer to pointer conversions are implementation defined). A > NULL pointer doesn't have to be represented with address 0x0, but a > *constant* 0 is guaranteed to represent a NULL pointer constant.
Thanks for the link ... I initially thought this was the case, but reading the standard made me believe otherwise, maybe I've got to improve my reading skills :-) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php