mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Convert more zend_parse_parameters_none() to fast ZPP (#21330)
This commit is contained in:
committed by
GitHub
parent
471ae15312
commit
11a95749b1
@@ -658,9 +658,7 @@ PHP_FUNCTION(com_create_guid)
|
||||
GUID retval;
|
||||
OLECHAR *guid_string;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
php_com_initialize();
|
||||
if (CoCreateGuid(&retval) == S_OK && StringFromCLSID(&retval, &guid_string) == S_OK) {
|
||||
|
||||
@@ -319,9 +319,7 @@ CPH_METHOD(GetCurFileName)
|
||||
OLECHAR *olename = NULL;
|
||||
CPH_FETCH();
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
CPH_NO_OBJ();
|
||||
|
||||
@@ -457,9 +455,7 @@ CPH_METHOD(GetMaxStreamSize)
|
||||
ULARGE_INTEGER size;
|
||||
CPH_FETCH();
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
CPH_NO_OBJ();
|
||||
|
||||
@@ -491,9 +487,7 @@ CPH_METHOD(InitNew)
|
||||
HRESULT res;
|
||||
CPH_FETCH();
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
CPH_NO_OBJ();
|
||||
|
||||
|
||||
@@ -1301,9 +1301,7 @@ PHP_FUNCTION(dba_handlers)
|
||||
/* {{{ List opened databases */
|
||||
PHP_FUNCTION(dba_list)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
|
||||
@@ -502,9 +502,7 @@ PHP_METHOD(DOMDocument, createDocumentFragment)
|
||||
dom_object *intern;
|
||||
|
||||
id = ZEND_THIS;
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
|
||||
|
||||
@@ -1251,9 +1249,7 @@ PHP_METHOD(DOMDocument, normalizeDocument)
|
||||
dom_object *intern;
|
||||
|
||||
id = ZEND_THIS;
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
|
||||
|
||||
@@ -1818,9 +1814,7 @@ PHP_METHOD(DOMDocument, validate)
|
||||
xmlValidCtxt *cvp;
|
||||
|
||||
id = ZEND_THIS;
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
|
||||
|
||||
|
||||
@@ -36,9 +36,7 @@ PHP_METHOD(DOMDocumentFragment, __construct)
|
||||
xmlNodePtr nodep = NULL, oldnode = NULL;
|
||||
dom_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
nodep = xmlNewDocFragment(NULL);
|
||||
|
||||
|
||||
@@ -1477,9 +1477,7 @@ PHP_METHOD(DOMElement, remove)
|
||||
{
|
||||
dom_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
DOM_GET_THIS_INTERN(intern);
|
||||
|
||||
|
||||
@@ -264,9 +264,7 @@ PHP_FUNCTION(enchant_broker_init)
|
||||
enchant_broker *broker;
|
||||
EnchantBroker *pbroker;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
pbroker = enchant_broker_init();
|
||||
if (pbroker) {
|
||||
|
||||
@@ -825,9 +825,7 @@ PHP_FUNCTION(filter_list)
|
||||
{
|
||||
int size = sizeof(filter_list) / sizeof(filter_list_entry);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
for (int i = 0; i < size; ++i) {
|
||||
|
||||
@@ -858,9 +858,7 @@ PHP_FUNCTION(hash_algos)
|
||||
{
|
||||
zend_string *str;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
ZEND_HASH_MAP_FOREACH_STR_KEY(&php_hash_hashtable, str) {
|
||||
@@ -875,9 +873,7 @@ PHP_FUNCTION(hash_hmac_algos)
|
||||
zend_string *str;
|
||||
const php_hash_ops *ops;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&php_hash_hashtable, str, ops) {
|
||||
@@ -1260,9 +1256,7 @@ PHP_FUNCTION(mhash_get_hash_name)
|
||||
/* {{{ Gets the number of available hashes */
|
||||
PHP_FUNCTION(mhash_count)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
RETURN_LONG(MHASH_NUM_ALGOS - 1);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1463,9 +1457,7 @@ PHP_METHOD(HashContext, __serialize)
|
||||
zend_long magic = 0;
|
||||
zval tmp;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
|
||||
@@ -1506,9 +1506,7 @@ PHP_FUNCTION(mb_ereg_search_getregs)
|
||||
int beg, end;
|
||||
OnigUChar *str;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (MBREX(search_regs) != NULL && Z_TYPE(MBREX(search_str)) == IS_STRING) {
|
||||
array_init(return_value);
|
||||
@@ -1544,9 +1542,7 @@ PHP_FUNCTION(mb_ereg_search_getregs)
|
||||
/* {{{ Get search start position */
|
||||
PHP_FUNCTION(mb_ereg_search_getpos)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETVAL_LONG(MBREX(search_pos));
|
||||
}
|
||||
|
||||
@@ -723,9 +723,7 @@ PHP_METHOD(mysqli_result, __construct)
|
||||
|
||||
PHP_METHOD(mysqli_result, getIterator)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
zend_create_internal_iterator_zval(return_value, ZEND_THIS);
|
||||
}
|
||||
|
||||
@@ -856,9 +856,7 @@ PHP_FUNCTION(mysqli_free_result)
|
||||
PHP_FUNCTION(mysqli_get_client_info)
|
||||
{
|
||||
if (hasThis()) {
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
} else {
|
||||
zval *mysql_link;
|
||||
|
||||
@@ -878,9 +876,7 @@ PHP_FUNCTION(mysqli_get_client_info)
|
||||
/* {{{ Get MySQL client info */
|
||||
PHP_FUNCTION(mysqli_get_client_version)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_LONG((zend_long)mysql_get_client_version());
|
||||
}
|
||||
@@ -1946,9 +1942,7 @@ PHP_FUNCTION(mysqli_thread_id)
|
||||
/* {{{ Return whether thread safety is given or not */
|
||||
PHP_FUNCTION(mysqli_thread_safe)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_BOOL(mysql_thread_safe());
|
||||
}
|
||||
|
||||
@@ -343,9 +343,7 @@ PHP_METHOD(mysqli, init)
|
||||
/* {{{ Returns the numerical value of the error message from last connect command */
|
||||
PHP_FUNCTION(mysqli_connect_errno)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_LONG(MyG(error_no));
|
||||
}
|
||||
@@ -354,9 +352,7 @@ PHP_FUNCTION(mysqli_connect_errno)
|
||||
/* {{{ Returns the text of the error message from previous MySQL operation */
|
||||
PHP_FUNCTION(mysqli_connect_error)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (MyG(error_msg)) {
|
||||
RETURN_STRING(MyG(error_msg));
|
||||
@@ -448,9 +444,7 @@ PHP_FUNCTION(mysqli_fetch_all)
|
||||
/* {{{ Returns statistics about the zval cache */
|
||||
PHP_FUNCTION(mysqli_get_client_stats)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
mysqlnd_get_client_stats(return_value);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1088,9 +1082,7 @@ PHP_FUNCTION(mysqli_release_savepoint)
|
||||
/* {{{ Returns information about open and cached links */
|
||||
PHP_FUNCTION(mysqli_get_links_stats)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
add_assoc_long_ex(return_value, "total", sizeof("total") - 1, MyG(num_links));
|
||||
|
||||
@@ -120,9 +120,7 @@ PHP_METHOD(mysqli_warning, next)
|
||||
MYSQLI_WARNING *w;
|
||||
mysqli_object *obj = Z_MYSQLI_P(ZEND_THIS);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (obj->ptr) {
|
||||
MYSQLI_FETCH_RESOURCE(w, MYSQLI_WARNING *, ZEND_THIS, MYSQLI_STATUS_VALID);
|
||||
|
||||
@@ -823,9 +823,7 @@ PHP_FUNCTION(odbc_close_all)
|
||||
{
|
||||
zval *zv;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
/* Loop through the link list, now close all links and their results */
|
||||
ZEND_HASH_FOREACH_VAL(&ODBCG(connections), zv) {
|
||||
|
||||
@@ -801,9 +801,7 @@ ZEND_FUNCTION(opcache_get_configuration)
|
||||
{
|
||||
zval directives, version, blacklist;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (!validate_api_restriction()) {
|
||||
RETURN_FALSE;
|
||||
@@ -908,9 +906,7 @@ ZEND_FUNCTION(opcache_get_configuration)
|
||||
/* {{{ Request that the contents of the opcode cache to be reset */
|
||||
ZEND_FUNCTION(opcache_reset)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (!validate_api_restriction()) {
|
||||
RETURN_FALSE;
|
||||
|
||||
@@ -522,9 +522,7 @@ PHP_MSHUTDOWN_FUNCTION(openssl)
|
||||
/* {{{ Retrieve an array mapping available certificate locations */
|
||||
PHP_FUNCTION(openssl_get_cert_locations)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
php_openssl_set_cert_locations(return_value);
|
||||
@@ -4024,9 +4022,7 @@ PHP_FUNCTION(openssl_error_string)
|
||||
char buf[256];
|
||||
unsigned long val;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
php_openssl_store_errors();
|
||||
|
||||
@@ -4444,9 +4440,7 @@ PHP_FUNCTION(openssl_get_curve_names)
|
||||
size_t i;
|
||||
size_t len = EC_get_builtin_curves(NULL, 0);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
curves = emalloc(sizeof(EC_builtin_curve) * len);
|
||||
if (!EC_get_builtin_curves(curves, len)) {
|
||||
|
||||
@@ -106,9 +106,7 @@ PHP_MINFO_FUNCTION(pdo_firebird) /* {{{ */
|
||||
|
||||
PHP_METHOD(Pdo_Firebird, getApiVersion)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_LONG(FB_API_VER);
|
||||
}
|
||||
|
||||
@@ -309,9 +309,7 @@ PHP_FUNCTION(readline_add_history)
|
||||
/* {{{ Clears the history */
|
||||
PHP_FUNCTION(readline_clear_history)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
#ifdef HAVE_LIBEDIT
|
||||
/* clear_history is the only function where rl_initialize
|
||||
@@ -331,9 +329,7 @@ PHP_FUNCTION(readline_list_history)
|
||||
{
|
||||
HIST_ENTRY **history;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
@@ -546,9 +542,7 @@ PHP_FUNCTION(readline_callback_handler_install)
|
||||
/* {{{ Informs the readline callback interface that a character is ready for input */
|
||||
PHP_FUNCTION(readline_callback_read_char)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (Z_TYPE(_prepped_callback) != IS_UNDEF) {
|
||||
rl_callback_read_char();
|
||||
@@ -559,9 +553,7 @@ PHP_FUNCTION(readline_callback_read_char)
|
||||
/* {{{ Removes a previously installed callback handler and restores terminal settings */
|
||||
PHP_FUNCTION(readline_callback_handler_remove)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (Z_TYPE(_prepped_callback) != IS_UNDEF) {
|
||||
rl_callback_handler_remove();
|
||||
@@ -576,9 +568,7 @@ PHP_FUNCTION(readline_callback_handler_remove)
|
||||
/* {{{ Ask readline to redraw the display */
|
||||
PHP_FUNCTION(readline_redisplay)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
#ifdef HAVE_LIBEDIT
|
||||
/* seems libedit doesn't take care of rl_initialize in rl_redisplay
|
||||
@@ -595,9 +585,7 @@ PHP_FUNCTION(readline_redisplay)
|
||||
/* {{{ Inform readline that the cursor has moved to a new line */
|
||||
PHP_FUNCTION(readline_on_new_line)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
rl_on_new_line();
|
||||
}
|
||||
|
||||
@@ -146,9 +146,7 @@ PHP_METHOD(SessionHandler, create_sid)
|
||||
{
|
||||
zend_string *id;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
PS_SANITY_CHECK;
|
||||
|
||||
|
||||
@@ -1923,9 +1923,7 @@ cleanup:
|
||||
|
||||
PHP_FUNCTION(session_get_cookie_params)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
@@ -2509,9 +2507,7 @@ PHP_FUNCTION(session_encode)
|
||||
{
|
||||
zend_string *enc;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
enc = php_session_encode();
|
||||
if (enc == NULL) {
|
||||
@@ -2638,18 +2634,14 @@ PHP_FUNCTION(session_start)
|
||||
|
||||
PHP_FUNCTION(session_destroy)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_BOOL(php_session_destroy() == SUCCESS);
|
||||
}
|
||||
|
||||
PHP_FUNCTION(session_unset)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (PS(session_status) != php_session_active) {
|
||||
RETURN_FALSE;
|
||||
@@ -2669,9 +2661,7 @@ PHP_FUNCTION(session_gc)
|
||||
{
|
||||
zend_long num;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (PS(session_status) != php_session_active) {
|
||||
php_error_docref(NULL, E_WARNING, "Session cannot be garbage collected when there is no active session");
|
||||
@@ -2689,9 +2679,7 @@ PHP_FUNCTION(session_gc)
|
||||
|
||||
PHP_FUNCTION(session_write_close)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_BOOL(php_session_flush(true));
|
||||
}
|
||||
@@ -2699,9 +2687,7 @@ PHP_FUNCTION(session_write_close)
|
||||
/* Abort session and end session. Session data will not be written */
|
||||
PHP_FUNCTION(session_abort)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_BOOL(php_session_abort());
|
||||
}
|
||||
@@ -2709,18 +2695,14 @@ PHP_FUNCTION(session_abort)
|
||||
/* Reset session data from saved session data */
|
||||
PHP_FUNCTION(session_reset)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_BOOL(php_session_reset());
|
||||
}
|
||||
|
||||
PHP_FUNCTION(session_status)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_LONG(PS(session_status));
|
||||
}
|
||||
|
||||
@@ -186,9 +186,7 @@ PHP_METHOD(SQLite3, close)
|
||||
int errcode;
|
||||
db_obj = Z_SQLITE3_DB_P(object);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (db_obj->initialised) {
|
||||
zend_llist_clean(&(db_obj->free_list));
|
||||
@@ -237,9 +235,7 @@ PHP_METHOD(SQLite3, exec)
|
||||
/* {{{ Returns the SQLite3 Library version as a string constant and as a number. */
|
||||
PHP_METHOD(SQLite3, version)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
@@ -257,9 +253,7 @@ PHP_METHOD(SQLite3, lastInsertRowID)
|
||||
zval *object = ZEND_THIS;
|
||||
db_obj = Z_SQLITE3_DB_P(object);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
|
||||
|
||||
@@ -274,9 +268,7 @@ PHP_METHOD(SQLite3, lastErrorCode)
|
||||
zval *object = ZEND_THIS;
|
||||
db_obj = Z_SQLITE3_DB_P(object);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3)
|
||||
|
||||
@@ -295,9 +287,7 @@ PHP_METHOD(SQLite3, lastExtendedErrorCode)
|
||||
zval *object = ZEND_THIS;
|
||||
db_obj = Z_SQLITE3_DB_P(object);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3)
|
||||
|
||||
@@ -343,9 +333,7 @@ PHP_METHOD(SQLite3, lastErrorMsg)
|
||||
zval *object = ZEND_THIS;
|
||||
db_obj = Z_SQLITE3_DB_P(object);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->db, SQLite3)
|
||||
|
||||
@@ -469,9 +457,7 @@ PHP_METHOD(SQLite3, changes)
|
||||
zval *object = ZEND_THIS;
|
||||
db_obj = Z_SQLITE3_DB_P(object);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3)
|
||||
|
||||
|
||||
@@ -374,9 +374,7 @@ exit:
|
||||
|
||||
PHP_FUNCTION(http_get_last_response_headers)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (!Z_ISUNDEF(BG(last_http_headers))) {
|
||||
RETURN_COPY(&BG(last_http_headers));
|
||||
@@ -387,9 +385,7 @@ PHP_FUNCTION(http_get_last_response_headers)
|
||||
|
||||
PHP_FUNCTION(http_clear_last_response_headers)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
zval_ptr_dtor(&BG(last_http_headers));
|
||||
ZVAL_UNDEF(&BG(last_http_headers));
|
||||
|
||||
@@ -907,9 +907,7 @@ PHP_FUNCTION(xmlwriter_open_memory)
|
||||
zval *self = getThis();
|
||||
ze_xmlwriter_object *ze_obj = NULL;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (self) {
|
||||
/* We do not use XMLWRITER_FROM_OBJECT, xmlwriter init function here */
|
||||
|
||||
@@ -814,9 +814,7 @@ PHP_METHOD(XSLTProcessor, getSecurityPrefs)
|
||||
zval *id = ZEND_THIS;
|
||||
xsl_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
intern = Z_XSL_P(id);
|
||||
|
||||
@@ -827,9 +825,7 @@ PHP_METHOD(XSLTProcessor, getSecurityPrefs)
|
||||
/* {{{ */
|
||||
PHP_METHOD(XSLTProcessor, hasExsltSupport)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
#ifdef HAVE_XSL_EXSLT
|
||||
RETURN_TRUE;
|
||||
|
||||
@@ -588,9 +588,7 @@ PHP_FUNCTION(ob_gzhandler)
|
||||
/* {{{ Returns the coding type used for output compression */
|
||||
PHP_FUNCTION(zlib_get_coding_type)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
switch (ZLIBG(compression_coding)) {
|
||||
case PHP_ZLIB_ENCODING_GZIP:
|
||||
RETURN_STRINGL("gzip", sizeof("gzip") - 1);
|
||||
|
||||
@@ -172,9 +172,7 @@ PHP_FUNCTION(apache_request_headers)
|
||||
const apr_array_header_t *arr;
|
||||
char *key, *val;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
@@ -195,9 +193,7 @@ PHP_FUNCTION(apache_response_headers)
|
||||
const apr_array_header_t *arr;
|
||||
char *key, *val;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
|
||||
@@ -1687,9 +1687,7 @@ static void add_response_header(sapi_header_struct *h, zval *return_value) /* {{
|
||||
|
||||
PHP_FUNCTION(apache_response_headers) /* {{{ */
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
zend_llist_apply_with_argument(&SG(sapi_headers).headers, (llist_apply_with_arg_func_t)add_response_header, return_value);
|
||||
|
||||
@@ -48,9 +48,7 @@ PHP_FUNCTION(cli_get_process_title)
|
||||
size_t length = 0;
|
||||
const char* title = NULL;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
ps_title_status rc = get_ps_title(&length, &title);
|
||||
if (rc != PS_TITLE_SUCCESS) {
|
||||
|
||||
@@ -401,9 +401,7 @@ PHP_FUNCTION(apache_request_headers) /* {{{ */
|
||||
{
|
||||
php_cli_server_client *client;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
client = SG(server_context);
|
||||
|
||||
@@ -442,9 +440,7 @@ static void add_response_header(sapi_header_struct *h, zval *return_value) /* {{
|
||||
|
||||
PHP_FUNCTION(apache_response_headers) /* {{{ */
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
zend_llist_apply_with_argument(&SG(sapi_headers).headers, (llist_apply_with_arg_func_t)add_response_header, return_value);
|
||||
|
||||
@@ -1492,9 +1492,7 @@ PHP_FUNCTION(fastcgi_finish_request) /* {{{ */
|
||||
{
|
||||
fcgi_request *request = (fcgi_request*) SG(server_context);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (!fcgi_is_closed(request)) {
|
||||
php_output_end_all();
|
||||
@@ -1514,9 +1512,7 @@ PHP_FUNCTION(apache_request_headers) /* {{{ */
|
||||
{
|
||||
fcgi_request *request;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
if ((request = (fcgi_request*) SG(server_context))) {
|
||||
@@ -1527,9 +1523,7 @@ PHP_FUNCTION(apache_request_headers) /* {{{ */
|
||||
/* {{{ Returns the status of the fastcgi process manager */
|
||||
PHP_FUNCTION(fpm_get_status) /* {{{ */
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (fpm_status_export_to_zval(return_value)) {
|
||||
RETURN_FALSE;
|
||||
|
||||
@@ -1658,9 +1658,7 @@ static int add_associate_array( const char * pKey, int keyLen, const char * pVal
|
||||
/* {{{ Fetch all HTTP request headers */
|
||||
PHP_FUNCTION(litespeed_request_headers)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
@@ -1679,9 +1677,7 @@ PHP_FUNCTION(litespeed_response_headers)
|
||||
int len;
|
||||
char headerBuf[SAPI_LSAPI_MAX_HEADER_LENGTH];
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
if (!zend_llist_count(&SG(sapi_headers).headers)) {
|
||||
RETURN_FALSE;
|
||||
@@ -1721,9 +1717,7 @@ PHP_FUNCTION(apache_get_modules)
|
||||
};
|
||||
const char **name = mod_names;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
array_init(return_value);
|
||||
while( *name )
|
||||
@@ -1738,9 +1732,7 @@ PHP_FUNCTION(apache_get_modules)
|
||||
/* {{{ Flushes all response data to the client */
|
||||
PHP_FUNCTION(litespeed_finish_request)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
php_output_end_all();
|
||||
php_header();
|
||||
|
||||
@@ -288,9 +288,7 @@ PHP_FUNCTION(phpdbg_break_next)
|
||||
{
|
||||
zend_execute_data *ex;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
ex = EG(current_execute_data);
|
||||
while (ex && ex->func && !ZEND_USER_CODE(ex->func->type)) {
|
||||
@@ -347,9 +345,7 @@ PHP_FUNCTION(phpdbg_break_function)
|
||||
/* {{{ instructs phpdbg to clear breakpoints */
|
||||
PHP_FUNCTION(phpdbg_clear)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE]);
|
||||
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE_PENDING]);
|
||||
@@ -404,9 +400,7 @@ PHP_FUNCTION(phpdbg_start_oplog)
|
||||
{
|
||||
phpdbg_oplog_list *prev;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
prev = PHPDBG_G(oplog_list);
|
||||
|
||||
|
||||
@@ -646,9 +646,7 @@ PHP_FUNCTION(sapi_windows_cp_get)
|
||||
/* {{{ Indicates whether the codepage is UTF-8 compatible. */
|
||||
PHP_FUNCTION(sapi_windows_cp_is_utf8)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_BOOL(php_win32_cp_use_unicode());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user