From: Rasmus Lerdorf Date: Tue, 23 Oct 2001 19:57:45 +0000 (+0000) Subject: Minor tweaks X-Git-Tag: POST_PARAMETER_PARSING_API~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=550550f746ec0c4ac8df2d9e2aab2a7051cec976;p=php Minor tweaks --- diff --git a/README.PARAMETER_PARSING_API b/README.PARAMETER_PARSING_API index a9b5572f76..1c6eea5200 100644 --- a/README.PARAMETER_PARSING_API +++ b/README.PARAMETER_PARSING_API @@ -67,6 +67,7 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsz", /* Gets an object of class specified by my_ce, and an optional double. */ zval *obj; double d = 0.5; +zend_class_entry my_ce; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|d", &obj, my_ce, &d) == FAILURE) { return; @@ -77,15 +78,15 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|d", If null is passed for object, obj will be set to NULL. */ zval *obj; zval *arr; -if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O!a", +if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o!a", &obj, &arr) == FAILURE) { return; } -/* Gets a separated array. */ +/* Gets a separated array which can also be null. */ zval *arr; -if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/", +if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/!", &arr) == FAILURE) { return; }