At least the C++ standard guarantees that all remaining members of the struct are initialized with their respective default value (which would is be 0/NULL). So technically speaking, simply using {NULL} is absolutely fine.
From a cursory glance it appears to me that it is the same with C, but
feel free to check the standard on your own ;) Regards, Michael On 6/1/06, Sara Golemon <[EMAIL PROTECTED]> wrote:
> According to all documentation I've found, a > zend_function_entry[] array should be ended > with { NULL, NULL, NULL }, but I've noticed > that _zend_function_entry now has five parts; > Your analysis is correct, however(functionally speaking) the only attribute that NEEDs to be explicitly set NULL is fname. The rest can be garbage and everything will still function fine. The second and third elements are set NULL becasue they can be safely without losing version agnosticism. We could extend the skeleton with a couple of zeros in those elements, but it'd need a note on the indavisability of doing that if you need BC with 4 (the compiler would spit error about excess elements in initializer). I'm all for a macro, maybe even a full start/end set like the global/ini/arg_info declarations have. Again, there's version BC to be considered, but that can be solved with some #ifndefs in the skeleton... PHP_BEGIN_FUNCTION_LIST(extname) PHP_FE(...) PHP_FE(...) PHP_FE(...) PHP_END_FUNCTION_LIST(extname) Same for the module entry.... These are all just window dressing though so unless someone else sees this as a worthwhile thing...*shrug* -Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php