ZTS cleanup

This commit is contained in:
Reeze Xia 2015-03-08 19:24:50 +08:00
parent 0cb869d908
commit 609f05fc19
15 changed files with 32 additions and 34 deletions

View File

@ -300,7 +300,7 @@ PHP_FUNCTION(ibase_blob_add)
RESET_ERRMSG;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &blob_arg, &string_arg)) {
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &blob_arg, &string_arg)) {
return;
}
@ -327,7 +327,7 @@ PHP_FUNCTION(ibase_blob_get)
RESET_ERRMSG;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &blob_arg, &len_arg)) {
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &blob_arg, &len_arg)) {
return;
}
@ -352,7 +352,7 @@ static void _php_ibase_blob_end(INTERNAL_FUNCTION_PARAMETERS, int bl_end) /* {{{
RESET_ERRMSG;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &blob_arg)) {
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "r", &blob_arg)) {
return;
}

View File

@ -292,8 +292,8 @@ static int _php_ibase_alloc_array(ibase_array **ib_arrayp, XSQLDA *sqlda, /* {{{
* were mentioned erroneously.
*/
default:
_php_ibase_module_error("Unsupported array type %d in relation '%s' column '%s'"
TSRMLS_CC, ar_desc->array_desc_dtype, var->relname, var->sqlname);
_php_ibase_module_error("Unsupported array type %d in relation '%s' column '%s'",
ar_desc->array_desc_dtype, var->relname, var->sqlname);
efree(ar);
return FAILURE;
} /* switch array_desc_type */
@ -511,8 +511,8 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
convert_to_string(val);
if (!sscanf(Z_STRVAL_P(val), "%Lf", &l)) {
_php_ibase_module_error("Cannot convert '%s' to long double"
TSRMLS_CC, Z_STRVAL_P(val));
_php_ibase_module_error("Cannot convert '%s' to long double",
Z_STRVAL_P(val));
return FAILURE;
}
@ -558,8 +558,8 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
#else
convert_to_string(val);
if (!sscanf(Z_STRVAL_P(val), "%" LL_MASK "d", &l)) {
_php_ibase_module_error("Cannot convert '%s' to long integer"
TSRMLS_CC, Z_STRVAL_P(val));
_php_ibase_module_error("Cannot convert '%s' to long integer",
Z_STRVAL_P(val));
return FAILURE;
} else {
*(ISC_INT64 *) buf = l;
@ -776,8 +776,7 @@ static int _php_ibase_bind(XSQLDA *sqlda, zval *b_vars, BIND_BUF *buf, /* {{{ */
if (FAILURE == _php_ibase_bind_array(b_var, array_data, ar->ar_size,
ar, 0)) {
_php_ibase_module_error("Parameter %d: failed to bind array argument"
TSRMLS_CC,i+1);
_php_ibase_module_error("Parameter %d: failed to bind array argument", i+1);
efree(array_data);
rv = FAILURE;
continue;
@ -1100,8 +1099,8 @@ PHP_FUNCTION(ibase_query)
}
/* the statement is 'CREATE DATABASE ...' if the link argument is IBASE_CREATE */
if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS()
TSRMLS_CC, "ls", &l, &query, &query_len) && l == PHP_IBASE_CREATE) {
if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
"ls", &l, &query, &query_len) && l == PHP_IBASE_CREATE) {
isc_db_handle db = NULL;
isc_tr_handle trans = NULL;

View File

@ -162,8 +162,7 @@ static void _php_ibase_user(INTERNAL_FUNCTION_PARAMETERS, char operation) /* {{{
user_flags[i], (char)args_len[i], (char)(args_len[i] >> 8), args[i]);
if ((spb_len + chunk) > sizeof(buf) || chunk <= 0) {
_php_ibase_module_error("Internal error: insufficient buffer space for SPB (%d)"
TSRMLS_CC, spb_len);
_php_ibase_module_error("Internal error: insufficient buffer space for SPB (%d)", spb_len);
RETURN_FALSE;
}
spb_len += chunk;

View File

@ -1826,7 +1826,7 @@ void php_json_parser_object_update(php_json_parser *parser, zval *object, zval *
key = "_empty_";
key_len = sizeof("_empty_") - 1;
}
add_property_zval_ex(object, key, key_len, zvalue TSRMLS_CC);
add_property_zval_ex(object, key, key_len, zvalue);
if (Z_REFCOUNTED_P(zvalue)) {
Z_DELREF_P(zvalue);

View File

@ -197,7 +197,7 @@ void php_json_parser_object_update(php_json_parser *parser, zval *object, zval *
key = "_empty_";
key_len = sizeof("_empty_") - 1;
}
add_property_zval_ex(object, key, key_len, zvalue TSRMLS_CC);
add_property_zval_ex(object, key, key_len, zvalue);
if (Z_REFCOUNTED_P(zvalue)) {
Z_DELREF_P(zvalue);

View File

@ -1055,7 +1055,7 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
extra->match_limit_recursion = (unsigned long)PCRE_G(recursion_limit);
if (pce->preg_options & PREG_REPLACE_EVAL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The /e modifier is no longer supported, use preg_replace_callback instead");
php_error_docref(NULL, E_WARNING, "The /e modifier is no longer supported, use preg_replace_callback instead");
return NULL;
}
if (!is_callable_replace) {

View File

@ -387,7 +387,7 @@ static int pdo_pgsql_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_
break;
case PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT:
php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is deprecated, use PDO::ATTR_EMULATE_PREPARES instead");
php_error_docref(NULL, E_DEPRECATED, "PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is deprecated, use PDO::ATTR_EMULATE_PREPARES instead");
ZVAL_BOOL(return_value, H->disable_native_prepares);
break;

View File

@ -5737,7 +5737,7 @@ static int php_pgsql_convert_match(const char *str, size_t str_len, const char *
}
if ((re = pcre_compile(regex, options, &err_msg, &err_offset, NULL)) == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot compile regex");
php_error_docref(NULL, E_WARNING, "Cannot compile regex");
return FAILURE;
}
@ -5747,7 +5747,7 @@ static int php_pgsql_convert_match(const char *str, size_t str_len, const char *
if (res == PCRE_ERROR_NOMATCH) {
return FAILURE;
} else if (res) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot exec regex");
php_error_docref(NULL, E_WARNING, "Cannot exec regex");
return FAILURE;
}
return SUCCESS;

View File

@ -50,7 +50,7 @@ $stub = '/*
/* $Id$ */
static inline void phar_get_stub(const char *index_php, const char *web, size_t *len, char **stub, const int name_len, const int web_len TSRMLS_DC)
static inline void phar_get_stub(const char *index_php, const char *web, size_t *len, char **stub, const int name_len, const int web_len)
{
';
$s1split = str_split($s1, 2046);

View File

@ -222,7 +222,7 @@ PS_VALIDATE_SID_FUNC(user)
}
/* dummy function defined by PS_MOD */
return php_session_validate_sid(mod_data, key TSRMLS_CC);
return php_session_validate_sid(mod_data, key);
}
PS_UPDATE_TIMESTAMP_FUNC(user)

View File

@ -2202,7 +2202,7 @@ static PHP_FUNCTION(session_start)
}
if (PS(id) && !(PS(id)->len)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot start session with empty session ID");
php_error_docref(NULL, E_WARNING, "Cannot start session with empty session ID");
RETURN_FALSE;
}
@ -2632,7 +2632,7 @@ static PHP_MINIT_FUNCTION(session) /* {{{ */
php_session_id_iface_entry->ce_flags |= ZEND_ACC_INTERFACE;
INIT_CLASS_ENTRY(ce, PS_UPDATE_TIMESTAMP_IFACE_NAME, php_session_update_timestamp_iface_functions);
php_session_update_timestamp_iface_entry = zend_register_internal_class(&ce TSRMLS_CC);
php_session_update_timestamp_iface_entry = zend_register_internal_class(&ce);
php_session_update_timestamp_iface_entry->ce_flags |= ZEND_ACC_INTERFACE;
/* Register base class */

View File

@ -9,7 +9,7 @@
#include <arpa/inet.h>
#endif
extern int php_string_to_if_index(const char *val, unsigned *out TSRMLS_DC);
extern int php_string_to_if_index(const char *val, unsigned *out);
#if HAVE_IPV6
/* Sets addr by hostname, or by ip in string form (AF_INET6) */

View File

@ -114,7 +114,7 @@ PHP_MINIT_FUNCTION(assert) /* {{{ */
REGISTER_LONG_CONSTANT("ASSERT_EXCEPTION", ASSERT_EXCEPTION, CONST_CS|CONST_PERSISTENT);
INIT_CLASS_ENTRY(ce, "AssertionException", NULL);
assertion_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C));
assertion_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default());
return SUCCESS;
}
@ -244,14 +244,14 @@ PHP_FUNCTION(assert)
if (ASSERTG(exception)) {
if (!description) {
zend_throw_exception(assertion_exception_ce, NULL, E_ERROR TSRMLS_CC);
zend_throw_exception(assertion_exception_ce, NULL, E_ERROR);
} else if (Z_TYPE_P(description) == IS_OBJECT &&
instanceof_function(Z_OBJCE_P(description), assertion_exception_ce TSRMLS_CC)) {
instanceof_function(Z_OBJCE_P(description), assertion_exception_ce)) {
Z_ADDREF_P(description);
zend_throw_exception_object(description TSRMLS_CC);
zend_throw_exception_object(description);
} else {
zend_string *str = zval_get_string(description);
zend_throw_exception(assertion_exception_ce, str->val, E_ERROR TSRMLS_CC);
zend_throw_exception(assertion_exception_ce, str->val, E_ERROR);
zend_string_release(str);
}
} else if (ASSERTG(warning)) {
@ -360,7 +360,7 @@ PHP_FUNCTION(assert_options)
if (ac == 2) {
zend_string *key = zend_string_init("assert.exception", sizeof("assert.exception")-1, 0);
zend_string *val = zval_get_string(value);
zend_alter_ini_entry_ex(key, val, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
zend_alter_ini_entry_ex(key, val, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0);
zend_string_release(val);
zend_string_release(key);
}

View File

@ -247,7 +247,7 @@ PHP_FUNCTION(gethostbynamel)
if(hostname_len > MAXFQDNLEN) {
/* name too long, protect from CVE-2015-0235 */
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Host name is too long, the limit is %d characters", MAXFQDNLEN);
php_error_docref(NULL, E_WARNING, "Host name is too long, the limit is %d characters", MAXFQDNLEN);
RETURN_FALSE;
}

View File

@ -376,7 +376,7 @@ static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t
if (memsize + count >= ts->smax) {
php_stream *file = php_stream_fopen_temporary_file(ts->tmpdir, "php", NULL);
if (file == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create temporary file, Check permissions in temporary files directory.");
php_error_docref(NULL, E_WARNING, "Unable to create temporary file, Check permissions in temporary files directory.");
return 0;
}
php_stream_write(file, membuf, memsize);