Accept null type hint in C
| From: | Bob Silva | Date: | Thu, 27 Oct 2005 06:51:18 +0000 |
| Subject: | Accept null type hint in C | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-19753@lists.php.net to get a copy of this message | ||
Hi,
Since NULL typehints are allowed in userland, how would I go about it in C?
I have ZEND_ARG_OBJ_INFO(0, obj, ZObject, 1) which has allow null set on.
Then in the method:
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &objA,
pow_ce_ZObject) == FAILURE) {
If I pass NULL, it fails on the grounds that it isn't a ZObject.
Also,
Could someone explain the purpose of the zend_parse_method_parameters
function as opposed to using the zend_parse_parameters?
Thanks
Bob Silva