]> granicus.if.org Git - php/commitdiff
New macro for check void parameters
authorFelipe Pena <felipe@php.net>
Thu, 28 Feb 2008 14:16:25 +0000 (14:16 +0000)
committerFelipe Pena <felipe@php.net>
Thu, 28 Feb 2008 14:16:25 +0000 (14:16 +0000)
35 files changed:
ext/com_dotnet/com_com.c
ext/curl/multi.c
ext/dom/php_dom.h
ext/fdf/fdf.c
ext/gd/gd.c
ext/imap/php_imap.c
ext/interbase/interbase.c
ext/mhash/mhash.c
ext/ming/ming.c
ext/mysql/php_mysql.c
ext/odbc/php_odbc.c
ext/openssl/openssl.c
ext/pcre/php_pcre.c
ext/session/session.c
ext/skeleton/create_stubs
ext/snmp/snmp.c
ext/soap/soap.c
ext/spl/spl_dllist.c
ext/sqlite/sqlite.c
ext/standard/basic_functions.c
ext/standard/dir.c
ext/standard/file.c
ext/standard/head.c
ext/standard/info.c
ext/standard/rand.c
ext/standard/streamsfuncs.c
ext/standard/string.c
ext/standard/syslog.c
ext/standard/user_filters.c
ext/unicode/collator.c
ext/unicode/locale.c
ext/unicode/unicode.c
ext/unicode/unicode_iterators.c
ext/xmlrpc/xmlrpc-epi-php.c
sapi/apache_hooks/php_apache.c

index 673de377f651ca96e1affd592199f187ae2e41ec..34993eb5effd00970c4647fb7537b36d3a4efbcc 100644 (file)
@@ -658,8 +658,8 @@ PHP_FUNCTION(com_create_guid)
        GUID retval;
        OLECHAR *guid_string;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        php_com_initialize(TSRMLS_C);
index d9feaefc2c2d4ac95b0de9f5f529bdf6d5b89a38..743ecefcf1bb4d1618dd12cc125a46b71a7c346a 100644 (file)
@@ -55,8 +55,8 @@ PHP_FUNCTION(curl_multi_init)
 {
        php_curlm *mh;
        
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        mh = ecalloc(1, sizeof(php_curlm));
index b70934586364d69ad8a207a0a716037f1f7e6c4e..84aa11a25446410b1f4431a574b1a249abcb42e3 100644 (file)
@@ -138,8 +138,7 @@ entry = zend_register_internal_class_ex(&ce, parent_ce, NULL TSRMLS_CC);
 }
 
 #define DOM_NO_ARGS() \
-       if (ZEND_NUM_ARGS() != 0) { \
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Expects exactly 0 parameters, %d given", ZEND_NUM_ARGS()); \
+       if (zend_parse_parameters_none() == FAILURE) { \
                return; \
        }
 
index d201f1b267db722f3996e0469d889410b918aa80..698d47eecce4737bf5a4bb4246bb39fb755f1c82 100644 (file)
@@ -528,8 +528,8 @@ PHP_FUNCTION(fdf_create)
        FDFDoc fdf;
        FDFErc err;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        err = FDFCreate(&fdf);
index 9fd5854ba795d5ce86e545af8389ec42a0ea55b8..57d3d2c7c60476560f12ebe4891daf0471abdd32 100644 (file)
@@ -1350,9 +1350,8 @@ PHP_MINFO_FUNCTION(gd)
  */
 PHP_FUNCTION(gd_info)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               ZEND_WRONG_PARAM_COUNT();
-               RETURN_FALSE;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        array_init(return_value);
@@ -2159,8 +2158,8 @@ PHP_FUNCTION(imagetypes)
        ret |= 16;
 #endif
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_LONG(ret);
index 21ced9043a444e296f50f562e77b550eb24d5c46..a6db72647a4a5c3d67d6b810ec36b29c3be631e8 100644 (file)
@@ -3657,8 +3657,8 @@ PHP_FUNCTION(imap_alerts)
 {
        STRINGLIST *cur=NIL;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        } 
   
        if (IMAPG(imap_alertstack) == NIL) {
@@ -3684,8 +3684,8 @@ PHP_FUNCTION(imap_errors)
 {
        ERRORLIST *cur=NIL;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        } 
   
        if (IMAPG(imap_errorstack) == NIL) {
@@ -3711,8 +3711,8 @@ PHP_FUNCTION(imap_last_error)
 {
        ERRORLIST *cur=NIL;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        } 
   
        if (IMAPG(imap_errorstack) == NIL) {
index 1523f19132bd673db89f9db799493b1274fe6a07..a8a6acd94dc248b2e436ac340ad64992747019cb 100644 (file)
@@ -203,8 +203,8 @@ int le_link, le_plink, le_trans;
    Return error message */
 PHP_FUNCTION(ibase_errmsg)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if (IBG(sql_code) != 0) {
@@ -219,8 +219,8 @@ PHP_FUNCTION(ibase_errmsg)
    Return error code */
 PHP_FUNCTION(ibase_errcode)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if (IBG(sql_code) != 0) {
index 41b8afb70870d1d07e31c9c9db5f5fa46dda0198..24eed65dc13500cae20a5748e193f69ac724664e 100644 (file)
@@ -63,7 +63,7 @@ zend_module_entry mhash_module_entry = {
 ZEND_GET_MODULE(mhash)
 #endif
 
-#define NO_ARGS() (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ""))
+#define NO_ARGS() (SUCCESS == zend_parse_parameters_none())
 
 #ifndef HAVE_MHASH_GET_HASH_NAME_STATIC_PROTO
 extern const char *mhash_get_hash_name_static(hashid hash);
index 66d20058a443d852a657248b1027e1c35ce399ae..cd4c0d5f12b263d9e469bd8c89f9b0401fe0979b 100644 (file)
@@ -443,8 +443,8 @@ static SWFBitmap getBitmap(zval *id TSRMLS_DC)
    Returns the width of this bitmap */
 PHP_METHOD(swfbitmap, getWidth)
 {
-       if(ZEND_NUM_ARGS() != 0) {
-           WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+           return;
        }
        RETURN_DOUBLE(SWFBitmap_getWidth(getBitmap(getThis() TSRMLS_CC)));
 }
@@ -454,8 +454,8 @@ PHP_METHOD(swfbitmap, getWidth)
    Returns the height of this bitmap */
 PHP_METHOD(swfbitmap, getHeight)
 {
-       if(ZEND_NUM_ARGS() != 0) {
-           WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+           return;
        }
        RETURN_DOUBLE(SWFBitmap_getHeight(getBitmap(getThis() TSRMLS_CC)));
 }
@@ -1056,9 +1056,9 @@ PHP_METHOD(swfdisplayitem, remove)
 {
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        SWFDisplayItem_remove(item);
 }
 /* }}} */
@@ -1086,9 +1086,9 @@ PHP_METHOD(swfdisplayitem, endMask)
 {
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        SWFDisplayItem_endMask(item);
 }
 /* }}} */
@@ -1100,9 +1100,9 @@ PHP_METHOD(swfdisplayitem, getX)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_x(item);
        RETURN_DOUBLE(ret);
 }
@@ -1115,9 +1115,9 @@ PHP_METHOD(swfdisplayitem, getY)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_y(item);
        RETURN_DOUBLE(ret);
 }
@@ -1130,9 +1130,9 @@ PHP_METHOD(swfdisplayitem, getXScale)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_xScale(item);
        RETURN_DOUBLE(ret);
 }
@@ -1145,9 +1145,9 @@ PHP_METHOD(swfdisplayitem, getYScale)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_yScale(item);
        RETURN_DOUBLE(ret);
 }
@@ -1160,9 +1160,9 @@ PHP_METHOD(swfdisplayitem, getXSkew)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_xSkew(item);
        RETURN_DOUBLE(ret);
 }
@@ -1175,9 +1175,9 @@ PHP_METHOD(swfdisplayitem, getYSkew)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_ySkew(item);
        RETURN_DOUBLE(ret);
 }
@@ -1190,9 +1190,9 @@ PHP_METHOD(swfdisplayitem, getRot)
        float ret;
        SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        ret = SWFDisplayItem_get_rot(item);
        RETURN_DOUBLE(ret);
 }
@@ -1547,8 +1547,8 @@ PHP_METHOD(swffont, getWideWidth)
    Returns the ascent of the font, or 0 if not available */
 PHP_METHOD(swffont, getAscent)
 {
-    if(ZEND_NUM_ARGS() != 0) {
-           WRONG_PARAM_COUNT;
+    if (zend_parse_parameters_none() == FAILURE) {
+           return;
        }
        RETURN_DOUBLE(SWFFont_getAscent(getFont(getThis() TSRMLS_CC)));
 }
@@ -1558,8 +1558,8 @@ PHP_METHOD(swffont, getAscent)
    Returns the descent of the font, or 0 if not available */
 PHP_METHOD(swffont, getDescent)
 {
-    if(ZEND_NUM_ARGS() != 0) {
-           WRONG_PARAM_COUNT;
+    if (zend_parse_parameters_none() == FAILURE) {
+           return;
        }
        RETURN_DOUBLE(SWFFont_getDescent(getFont(getThis() TSRMLS_CC)));
 }
@@ -1569,8 +1569,8 @@ PHP_METHOD(swffont, getDescent)
    Returns the leading of the font, or 0 if not available */
 PHP_METHOD(swffont, getLeading)
 {
-    if(ZEND_NUM_ARGS() != 0) {
-           WRONG_PARAM_COUNT;
+    if (zend_parse_parameters_none() == FAILURE) {
+           return;
        }
        RETURN_DOUBLE(SWFFont_getLeading(getFont(getThis() TSRMLS_CC)));
 }
@@ -1879,9 +1879,9 @@ PHP_METHOD(swfsoundinstance, noMultiple)
 {
        SWFSoundInstance inst = getSoundInstance(getThis() TSRMLS_CC);
 
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        SWFSoundInstance_setNoMultiple(inst);
 }
 /* }}} */
@@ -2030,9 +2030,9 @@ PHP_METHOD(swfvideostream, setdimension)
 /* {{{ getNumFrames */
 PHP_METHOD(swfvideostream, getnumframes) 
 {
-       if(ZEND_NUM_ARGS() != 0)
-               WRONG_PARAM_COUNT;
-
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
+       }
        RETURN_LONG(SWFVideoStream_getNumFrames(getVideoStream(getThis() TSRMLS_CC)));
 }
 /* }}} */
@@ -3746,8 +3746,8 @@ PHP_METHOD(swftext, getWideWidth)
    Returns the ascent of the current font at its current size, or 0 if not available */
 PHP_METHOD(swftext, getAscent)
 {
-       if(ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        RETURN_DOUBLE(SWFText_getAscent(getText(getThis() TSRMLS_CC)));
 }
@@ -3757,8 +3757,8 @@ PHP_METHOD(swftext, getAscent)
    Returns the descent of the current font at its current size, or 0 if not available */
 PHP_METHOD(swftext, getDescent)
 {
-       if(ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
   RETURN_DOUBLE(SWFText_getDescent(getText(getThis() TSRMLS_CC)));
 }
@@ -3768,8 +3768,8 @@ PHP_METHOD(swftext, getDescent)
    Returns the leading of the current font at its current size, or 0 if not available */
 PHP_METHOD(swftext, getLeading)
 {
-       if(ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
   RETURN_DOUBLE(SWFText_getLeading(getText(getThis() TSRMLS_CC)));
 }
index da4c6fd610561f362d7ea1ab9df1ef8a3ffe9b0b..ad26fdd97239d6927b25db208fb59854fb9b078d 100644 (file)
@@ -1032,8 +1032,8 @@ PHP_FUNCTION(mysql_select_db)
    Returns a string that represents the client library version */
 PHP_FUNCTION(mysql_get_client_info)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_UTF8_STRING((char *)mysql_get_client_info(), ZSTR_DUPLICATE);
index accccc80f5dbe222363e1fa29c175fa0c8ef03ed..31f2dcdc90bee1b47dd6be99cf7135fd8e289847 100644 (file)
@@ -782,8 +782,8 @@ PHP_FUNCTION(odbc_close_all)
        int i;
        int nument;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        nument = zend_hash_next_free_element(&EG(regular_list));
index 8027e0d678d1d23a261c9d3425aeac1c3bdb02f0..b395bd28038600556de4f8f8ae3dc74fb1000d84 100644 (file)
@@ -3686,8 +3686,8 @@ PHP_FUNCTION(openssl_error_string)
        char buf[512];
        unsigned long val;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        val = ERR_get_error();
index 9fc3c45edbfe89f8f563f38d11c7cf58af25b229..6abb2a4efd07274d867e262df3bce63fe06e1b67 100644 (file)
@@ -2023,7 +2023,7 @@ PHPAPI void  php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return
    Returns the error code of the last regexp execution. */
 static PHP_FUNCTION(preg_last_error)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
index a6bb7357bb75b9574aba36ed108964210b81402a..695da00c55e8f65ac610711f47212dde68aa322c 100644 (file)
@@ -1402,8 +1402,8 @@ static PHP_FUNCTION(session_set_cookie_params)
    Return the session cookie parameters */ 
 static PHP_FUNCTION(session_get_cookie_params)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        array_init(return_value);
@@ -1690,8 +1690,8 @@ static PHP_FUNCTION(session_encode)
        int len;
        char *enc;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        enc = php_session_encode(&len TSRMLS_CC);
@@ -1738,8 +1738,8 @@ static PHP_FUNCTION(session_start)
    Destroy the current session and all data associated with it */
 static PHP_FUNCTION(session_destroy)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_BOOL(php_session_destroy(TSRMLS_C) == SUCCESS);
index 61957289d087582cc7bfc3ac9c617f9942f16033..0a5f28607e274bbbd5628b226ad0fa56d530ec1b 100755 (executable)
@@ -197,7 +197,7 @@ END {
                        ints = ints "\tint argc = ZEND_NUM_ARGS();\n"
                        fetchargs = fetchargs "argc TSRMLS_CC, " specs[i]
                } else {
-                       fetchargs = fetchargs "\tif (ZEND_NUM_ARGS() != 0) {\n\t\tWRONG_PARAM_COUNT;\n\t}"
+                       fetchargs = fetchargs "\tif (zend_parse_parameters_none() == FAILURE) {\n\t\treturn;\n\t}"
                        xmlparams = xmlparams "      <void/>\n"
                }
 
index 4864ee7b252738ac1bbedeee7da691609abf14a3..0a880ca1e06d9cc759c5ef18b46d3d611edef74b 100644 (file)
@@ -693,8 +693,8 @@ PHP_FUNCTION(snmprealwalk)
    Return the current status of quick_print */
 PHP_FUNCTION(snmp_get_quick_print)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
 #ifdef HAVE_NET_SNMP
index 8f2210b76c34fca045273691004a5bf1c211c7ee..ff01c7d3c07bac8c8c7943551fc2fbfb5b39d8b7 100644 (file)
@@ -111,8 +111,8 @@ static void soap_error_handler(int error_num, const char *error_filename, const
 #define HTTP_RAW_POST_DATA "HTTP_RAW_POST_DATA"
 
 #define ZERO_PARAM() \
-       if (ZEND_NUM_ARGS() != 0) \
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) \
+               return;
 
 static zend_class_entry* soap_client_class_entry;
 static zend_class_entry* soap_server_class_entry;
@@ -1130,8 +1130,8 @@ PHP_METHOD(SoapFault, __toString)
        zend_fcall_info fci;
        zval fname;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               ZEND_WRONG_PARAM_COUNT();
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        faultcode   = zend_read_property(soap_fault_class_entry, this_ptr, "faultcode", sizeof("faultcode")-1, 1 TSRMLS_CC);
index 15cb7593370ed0bca60bd5834c91bae473792378..03d5411bdfab2386a502cb7761d24fe9e440c0ca 100644 (file)
@@ -565,7 +565,7 @@ SPL_METHOD(SplDoublyLinkedList, pop)
        zval *value;
        spl_dllist_object *intern;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -588,7 +588,7 @@ SPL_METHOD(SplDoublyLinkedList, shift)
        zval *value;
        spl_dllist_object *intern;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -611,7 +611,7 @@ SPL_METHOD(SplDoublyLinkedList, top)
        zval *value;
        spl_dllist_object *intern;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -634,7 +634,7 @@ SPL_METHOD(SplDoublyLinkedList, bottom)
        zval *value;
        spl_dllist_object *intern;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -656,7 +656,7 @@ SPL_METHOD(SplDoublyLinkedList, count)
 {
        long count;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -671,7 +671,7 @@ SPL_METHOD(SplDoublyLinkedList, isEmpty)
 {
        long count;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -711,7 +711,7 @@ SPL_METHOD(SplDoublyLinkedList, getIteratorMode)
 {
        spl_dllist_object *intern;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
index 754b8aeefceebd8318d2dba95d1531492aacf6fa..4cc0b928af09710e29c483ee7d75caf2e45e7485 100644 (file)
@@ -2615,8 +2615,8 @@ PHP_FUNCTION(sqlite_column)
    Returns the version of the linked SQLite library. */
 PHP_FUNCTION(sqlite_libversion)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        RETURN_ASCII_STRING((char*)sqlite_libversion(), ZSTR_DUPLICATE);
 }
@@ -2626,8 +2626,8 @@ PHP_FUNCTION(sqlite_libversion)
    Returns the encoding (iso8859 or UTF-8) of the linked SQLite library. */
 PHP_FUNCTION(sqlite_libencoding)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
        RETURN_ASCII_STRING((char*)sqlite_libencoding(), ZSTR_DUPLICATE);
 }
@@ -2642,8 +2642,8 @@ PHP_FUNCTION(sqlite_changes)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                DB_FROM_OBJECT(db, object);
        } else {
@@ -2666,8 +2666,8 @@ PHP_FUNCTION(sqlite_last_insert_rowid)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                DB_FROM_OBJECT(db, object);
        } else {
@@ -2703,8 +2703,8 @@ PHP_FUNCTION(sqlite_num_rows)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2732,8 +2732,8 @@ PHP_FUNCTION(sqlite_valid)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2756,8 +2756,8 @@ PHP_FUNCTION(sqlite_has_prev)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2785,8 +2785,8 @@ PHP_FUNCTION(sqlite_num_fields)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2874,8 +2874,8 @@ PHP_FUNCTION(sqlite_rewind)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2909,8 +2909,8 @@ PHP_FUNCTION(sqlite_next)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2944,8 +2944,8 @@ PHP_FUNCTION(sqlite_key)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -2968,8 +2968,8 @@ PHP_FUNCTION(sqlite_prev)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                RES_FROM_OBJECT(res, object);
        } else {
@@ -3036,8 +3036,8 @@ PHP_FUNCTION(sqlite_last_error)
        zval *object = getThis();
 
        if (object) {
-               if (ZEND_NUM_ARGS() != 0) {
-                       WRONG_PARAM_COUNT
+               if (zend_parse_parameters_none() == FAILURE) {
+                       return;
                }
                DB_FROM_OBJECT(db, object);
        } else {
index 07d47841cfac1e10b80dd7409d03d91414119ffa..ac61813713b4d7a766bafa19a066d88aabe8da26 100644 (file)
@@ -4828,8 +4828,8 @@ PHP_FUNCTION(time_sleep_until)
    Get the name of the owner of the current PHP script */
 PHP_FUNCTION(get_current_user)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_RT_STRING(php_get_current_user(), ZSTR_DUPLICATE);
@@ -5055,7 +5055,7 @@ PHPAPI char *php_get_current_user(void) /* {{{ */
        Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet. */
 PHP_FUNCTION(error_get_last)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -5804,7 +5804,7 @@ PHP_FUNCTION(get_include_path)
 {
        char *str;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -5822,7 +5822,7 @@ PHP_FUNCTION(get_include_path)
    Restore the value of the include_path configuration option */
 PHP_FUNCTION(restore_include_path)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
        zend_restore_ini_entry("include_path", sizeof("include_path"), PHP_INI_STAGE_RUNTIME);
index d834d795f6973566e1ee8d09dbf1f0fa04480b81..bf2c3ca4eb1a631c2f1a0161e695ac695a653a2a 100644 (file)
@@ -355,8 +355,8 @@ PHP_FUNCTION(getcwd)
        char path[MAXPATHLEN];
        char *ret=NULL;
        
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
 #if HAVE_GETCWD
index dfd5988193ca33054f0ab70139fdc8925b7da71a..26d14ddc74a8afd1d7fe2faa3f52e9fa044f459a 100644 (file)
@@ -957,8 +957,8 @@ PHP_NAMED_FUNCTION(php_if_tmpfile)
 {
        php_stream *stream;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        stream = php_stream_fopen_tmpfile();
index 0d4fba17bc4bd4f580ed23e733d90f9d416865aa..4d2fe4fd7818dd4872efca1c691a5c6b1d585091 100644 (file)
@@ -262,8 +262,8 @@ static void php_head_apply_header_list_to_hash(void *data, void *arg TSRMLS_DC)
    Return list of headers to be sent / already sent */
 PHP_FUNCTION(headers_list)
 {
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if (!&SG(sapi_headers).headers) {
index 40dc92ad729390833c52c3d42af28f1ec5502572..d711c18ac6c44fec11a65cfa5b88a6f0d48f0b2a 100644 (file)
@@ -1024,7 +1024,7 @@ PHPAPI char *php_logo_guid(void)
    Return the special ID used to request the PHP logo in phpinfo screens*/
 PHP_FUNCTION(php_logo_guid)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1036,7 +1036,7 @@ PHP_FUNCTION(php_logo_guid)
    Return the special ID used to request the PHP logo in phpinfo screens*/
 PHP_FUNCTION(php_real_logo_guid)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1048,7 +1048,7 @@ PHP_FUNCTION(php_real_logo_guid)
    Return the special ID used to request the PHP logo in phpinfo screens*/
 PHP_FUNCTION(php_egg_logo_guid)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1060,7 +1060,7 @@ PHP_FUNCTION(php_egg_logo_guid)
    Return the special ID used to request the Zend logo in phpinfo screens*/
 PHP_FUNCTION(zend_logo_guid)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1072,7 +1072,7 @@ PHP_FUNCTION(zend_logo_guid)
    Return the current SAPI module name */
 PHP_FUNCTION(php_sapi_name)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
index 7f2846764054c451755f7db5677d613aba7cb068..9ff027b5e1cc48bb47cae9bf2ea344b052072433 100644 (file)
@@ -351,8 +351,8 @@ PHP_FUNCTION(mt_rand)
    Returns the maximum value a random number can have */
 PHP_FUNCTION(getrandmax)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        RETURN_LONG(PHP_RAND_MAX);
@@ -363,8 +363,8 @@ PHP_FUNCTION(getrandmax)
    Returns the maximum value a random number from Mersenne Twister can have */
 PHP_FUNCTION(mt_getrandmax)
 {
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        /*
index 98671a8501e7b48468cf5b4fb7e642002c3ef11a..d0dc7353dcc0fe3435c01ae15bb004221bbb4b2b 100644 (file)
@@ -566,8 +566,8 @@ PHP_FUNCTION(stream_get_transports)
        uint stream_xport_len;
        ulong num_key;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if ((stream_xport_hash = php_stream_xport_get_hash())) {
@@ -594,8 +594,8 @@ PHP_FUNCTION(stream_get_wrappers)
        uint key_flags, stream_protocol_len = 0;
        ulong num_key;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if ((url_stream_wrappers_hash = php_stream_get_url_stream_wrappers_hash())) {
index a85888d33c9b5a7861cee92b0428610935b4cef3..03679e74bb0a3a9a882e3ba77d59d1201e62dc93 100644 (file)
@@ -7172,7 +7172,7 @@ PHP_FUNCTION(localeconv)
        int len, i;
 
        /* We don't need no stinkin' parameters... */
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
index 090fb4db7eb430e9c27aeff7d46fbd7f5dca1507..fd05b509fdb10cf878116aa625457dc242bc4cc6 100644 (file)
@@ -205,7 +205,7 @@ static void start_syslog(TSRMLS_D)
    Initializes all syslog-related variables */
 PHP_FUNCTION(define_syslog_variables)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -245,7 +245,7 @@ PHP_FUNCTION(openlog)
    Close connection to system logger */
 PHP_FUNCTION(closelog)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
index a0a4e78c42ae9609a7bce6e3277035961fd1db78..e5ea2bbe984f717e86de2cfe906bcd07de9da2a4 100644 (file)
@@ -577,8 +577,8 @@ PHP_FUNCTION(stream_get_filters)
        HashPosition pos;
        ulong num_key;
 
-       if (ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        array_init(return_value);
index 68eb06aa74b656822576a6a1fbc6db0a3b4a0520..2d50aeb2064346cc242931f74fe278577ba9b3b2 100644 (file)
@@ -332,7 +332,7 @@ PHP_FUNCTION(collator_get_attribute)
    Returns default collator */
 PHP_FUNCTION(collator_get_default)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                RETURN_FALSE;
        }
 
index c91e8c5fdcf4758a208db0f34eb36546cde5e062..9fc7e5f8e2f65c1d6d945e71f9f4ae20a0066b0e 100644 (file)
@@ -42,7 +42,7 @@ static void php_canonicalize_locale_id(char **target, int32_t *target_len, char
    Returns default locale */
 PHP_FUNCTION(locale_get_default)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
index ade1704a9de96fc30fb46c587e20d354ea18f7c8..34e86a62600b8e1dfcfa7de65ab25111874ceab4 100644 (file)
@@ -224,7 +224,7 @@ PHP_FUNCTION(unicode_get_error_mode)
    Returns global substitution character for conversion from Unicode to codepage */
 PHP_FUNCTION(unicode_get_subst_char)
 {
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
index ef663fb03df774e4e2c87830033a429d67e18388..a3e66a3f5864e46c2f2300c523a34369bd880fb1 100644 (file)
@@ -1043,7 +1043,7 @@ PHP_METHOD(TextIterator, current)
        zval *object = getThis();
        text_iter_obj *intern = (text_iter_obj*) zend_object_store_get_object(object TSRMLS_CC);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1087,7 +1087,7 @@ PHP_METHOD(TextIterator, key)
        zval *object = getThis();
        text_iter_obj *intern = (text_iter_obj*) zend_object_store_get_object(object TSRMLS_CC);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1102,7 +1102,7 @@ PHP_METHOD(TextIterator, valid)
        zval *object = getThis();
        text_iter_obj *intern = (text_iter_obj*) zend_object_store_get_object(object TSRMLS_CC);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1118,7 +1118,7 @@ PHP_METHOD(TextIterator, rewind)
        zval *object = getThis();
        text_iter_obj *intern = (text_iter_obj*) zend_object_store_get_object(object TSRMLS_CC);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1140,7 +1140,7 @@ PHP_METHOD(TextIterator, last)
        zval *object = getThis();
        text_iter_obj *intern = (text_iter_obj*) zend_object_store_get_object(object TSRMLS_CC);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1162,7 +1162,7 @@ PHP_METHOD(TextIterator, offset)
        zval *object = getThis();
        text_iter_obj *intern = (text_iter_obj*) zend_object_store_get_object(object TSRMLS_CC);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1267,7 +1267,7 @@ PHP_METHOD(TextIterator, getAvailableLocales)
 {
        int32_t count, i;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1286,7 +1286,7 @@ PHP_METHOD(TextIterator, getRuleStatus)
        zval *object = getThis();
        text_iter_obj *intern = (text_iter_obj*) zend_object_store_get_object(object TSRMLS_CC);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1308,7 +1308,7 @@ PHP_METHOD(TextIterator, getRuleStatusArray)
        text_iter_obj *intern = (text_iter_obj*) zend_object_store_get_object(object TSRMLS_CC);
        UErrorCode status = U_ZERO_ERROR;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
@@ -1344,7 +1344,7 @@ PHP_METHOD(TextIterator, getAll)
        text_iter_obj *intern = (text_iter_obj*) zend_object_store_get_object(object TSRMLS_CC);
        text_iter_ops *ops = iter_ops[intern->type];
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+       if (zend_parse_parameters_none() == FAILURE) {
                return;
        }
 
index 4cc199767a08972a5675bf7fae190c796c3376ea..7974709f7b9395721bac5ed9c7d494dbc04e3a2c 100644 (file)
@@ -785,8 +785,8 @@ PHP_FUNCTION(xmlrpc_decode)
    Creates an xmlrpc server */
 PHP_FUNCTION(xmlrpc_server_create)
 {
-       if(ZEND_NUM_ARGS() != 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        if(return_value_used) {
index 7549c6eb7024526e67ac241224134306bb4ac81b..1b24dd8b1cb6770232ed0e2a8f63b9634ca799e6 100644 (file)
@@ -164,8 +164,8 @@ static void apache_request_read_string_slot(int offset, INTERNAL_FUNCTION_PARAME
        request_rec *r;
        char *s;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -224,8 +224,8 @@ static void apache_request_read_int_slot(int offset, INTERNAL_FUNCTION_PARAMETER
        request_rec *r;
        long l;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -683,8 +683,8 @@ PHP_FUNCTION(apache_request_server_port)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -766,8 +766,8 @@ PHP_FUNCTION(apache_request_set_etag)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -784,8 +784,8 @@ PHP_FUNCTION(apache_request_set_last_modified)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -802,8 +802,8 @@ PHP_FUNCTION(apache_request_meets_conditions)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -819,8 +819,8 @@ PHP_FUNCTION(apache_request_discard_request_body)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -836,8 +836,8 @@ PHP_FUNCTION(apache_request_satisfies)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -854,8 +854,8 @@ PHP_FUNCTION(apache_request_is_initial_req)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -871,8 +871,8 @@ PHP_FUNCTION(apache_request_some_auth_required)
        zval *id;
        request_rec *r;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -889,8 +889,8 @@ PHP_FUNCTION(apache_request_auth_type)
        request_rec *r;
        char *t;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);
@@ -911,8 +911,8 @@ PHP_FUNCTION(apache_request_auth_name)
        request_rec *r;
        char *t;
 
-       if (ZEND_NUM_ARGS() > 0) {
-               WRONG_PARAM_COUNT;
+       if (zend_parse_parameters_none() == FAILURE) {
+               return;
        }
 
        APREQ_GET_REQUEST(id, r);