More TSRMLS_FETCH work, and a bit of cleanup

This commit is contained in:
Zeev Suraski 2001-07-30 06:18:13 +00:00
parent e8ac55d03c
commit 797a079a95
58 changed files with 81 additions and 208 deletions

View File

@ -126,9 +126,9 @@ PHP_RINIT_FUNCTION(bcmath)
PHP_MINFO_FUNCTION(bcmath)
{
php_info_print_table_start();
php_info_print_table_row(2, "BCMath support", "enabled");
php_info_print_table_end();
php_info_print_table_start();
php_info_print_table_row(2, "BCMath support", "enabled");
php_info_print_table_end();
}
/* {{{ proto string bcadd(string left_operand, string right_operand [, int scale])

View File

@ -57,14 +57,14 @@ function_entry calendar_functions[] = {
zend_module_entry calendar_module_entry = {
"calendar",
calendar_functions,
PHP_MINIT(calendar),
NULL,
NULL,
NULL,
PHP_MINFO(calendar),
STANDARD_MODULE_PROPERTIES,
"calendar",
calendar_functions,
PHP_MINIT(calendar),
NULL,
NULL,
NULL,
PHP_MINFO(calendar),
STANDARD_MODULE_PROPERTIES,
};
#ifdef COMPILE_DL_CALENDAR

View File

@ -352,7 +352,6 @@ static PHP_INI_MH(OnTypelibFileChange)
char *typelib_name_buffer;
char *strtok_buf = NULL;
int interactive;
TSRMLS_FETCH();
interactive = CG(interactive);

View File

@ -205,7 +205,8 @@ PHP_MINFO_FUNCTION(cpdf) {
php_info_print_table_end();
}
PHP_MSHUTDOWN_FUNCTION(cpdf){
PHP_MSHUTDOWN_FUNCTION(cpdf)
{
return SUCCESS;
}

View File

@ -104,7 +104,6 @@ ZEND_MINIT_FUNCTION(crack)
ZEND_MSHUTDOWN_FUNCTION(crack)
{
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
@ -118,12 +117,9 @@ ZEND_RINIT_FUNCTION(crack)
ZEND_RSHUTDOWN_FUNCTION(crack)
{
TSRMLS_FETCH();
if (NULL != CRACKG(last_message)) {
efree(CRACKG(last_message));
}
return SUCCESS;
}

View File

@ -85,8 +85,6 @@ ZEND_GET_MODULE(ctype)
*/
PHP_MINFO_FUNCTION(ctype)
{
TSRMLS_FETCH();
php_info_print_table_start();
php_info_print_table_row(2, "ctype functions", "enabled (experimental)");
php_info_print_table_end();

View File

@ -147,9 +147,6 @@ PHP_MINIT_FUNCTION(dbplus)
PHP_MSHUTDOWN_FUNCTION(dbplus)
{
/* Remove comments if you have entries in php.ini
UNREGISTER_INI_ENTRIES();
*/
return SUCCESS;
}

View File

@ -102,8 +102,6 @@ PHP_MINIT_FUNCTION(regex)
PHP_MSHUTDOWN_FUNCTION(regex)
{
TSRMLS_FETCH();
zend_hash_destroy(&REG(ht_rc));
return SUCCESS;
}

View File

@ -142,7 +142,8 @@ ZEND_GET_MODULE(exif)
/* {{{ PHP_MINFO_FUNCTION
*/
PHP_MINFO_FUNCTION(exif) {
PHP_MINFO_FUNCTION(exif)
{
php_info_print_table_start();
php_info_print_table_row(2, "EXIF Support", "enabled" );
php_info_print_table_end();

View File

@ -405,7 +405,6 @@ PHP_RSHUTDOWN_FUNCTION(fbsql)
PHP_MINFO_FUNCTION(fbsql)
{
char buf[32];
TSRMLS_FETCH();
php_info_print_table_start();
php_info_print_table_header(2, "FrontBase support", "enabled");

View File

@ -120,10 +120,11 @@ PHP_MSHUTDOWN_FUNCTION(filepro)
SET_MUTEX(fp_mutex);
numthreads--;
if (!numthreads){
if (!TlsFree(FPTls)){
FREE_MUTEX(fp_mutex);
return 0;
}}
if (!TlsFree(FPTls)){
FREE_MUTEX(fp_mutex);
return 0;
}
}
FREE_MUTEX(fp_mutex);
#endif
#endif

View File

@ -98,9 +98,9 @@ PHP_MINIT_FUNCTION(ftp)
PHP_MINFO_FUNCTION(ftp)
{
php_info_print_table_start();
php_info_print_table_row(2, "FTP support", "enabled");
php_info_print_table_end();
php_info_print_table_start();
php_info_print_table_row(2, "FTP support", "enabled");
php_info_print_table_end();
}

View File

@ -154,9 +154,6 @@ ZEND_MINIT_FUNCTION(gmp)
*/
ZEND_MSHUTDOWN_FUNCTION(gmp)
{
/* Remove comments if you have entries in php.ini
UNREGISTER_INI_ENTRIES();
*/
return SUCCESS;
}
/* }}} */

View File

@ -196,8 +196,6 @@ static void php_hw_init_globals(zend_hw_globals *hw_globals)
static PHP_INI_MH(OnHyperwavePort)
{
TSRMLS_FETCH();
if (new_value==NULL) {
HwSG(default_port) = HG_SERVER_PORT;
} else {

View File

@ -310,7 +310,6 @@ PHP_RSHUTDOWN_FUNCTION(imap)
{
ERRORLIST *ecur = NIL;
STRINGLIST *acur = NIL;
TSRMLS_FETCH();
if (IMAPG(imap_errorstack) != NIL) {
/* output any remaining errors at their original error level */

View File

@ -67,14 +67,14 @@ function_entry ii_functions[] = {
};
zend_module_entry ingres_ii_module_entry = {
"ingres_ii",
ii_functions,
PHP_MINIT(ii),
PHP_MSHUTDOWN(ii),
PHP_RINIT(ii),
PHP_RSHUTDOWN(ii),
PHP_MINFO(ii),
STANDARD_MODULE_PROPERTIES
"ingres_ii",
ii_functions,
PHP_MINIT(ii),
PHP_MSHUTDOWN(ii),
PHP_RINIT(ii),
PHP_RSHUTDOWN(ii),
PHP_MINFO(ii),
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_INGRES_II
@ -312,8 +312,6 @@ PHP_RINIT_FUNCTION(ii)
*/
PHP_RSHUTDOWN_FUNCTION(ii)
{
TSRMLS_FETCH();
if (IIG(default_link)!=-1) {
zend_list_delete(IIG(default_link));
IIG(default_link) = -1;
@ -326,7 +324,6 @@ PHP_RSHUTDOWN_FUNCTION(ii)
PHP_MINFO_FUNCTION(ii)
{
char buf[32];
TSRMLS_FETCH();
php_info_print_table_start();
php_info_print_table_header(2, "Ingres II Support", "enabled");

View File

@ -554,8 +554,6 @@ PHP_MSHUTDOWN_FUNCTION(ibase)
PHP_RSHUTDOWN_FUNCTION(ibase)
{
TSRMLS_FETCH();
if (IBG(timestampformat))
DL_FREE(IBG(timestampformat));
IBG(timestampformat) = NULL;

View File

@ -106,10 +106,11 @@ php_java_globals java_globals;
static zend_class_entry java_class_entry;
static PHP_INI_MH(OnIniUpdate) {
if (new_value) *(char**)mh_arg1 = new_value;
iniUpdated=1;
return SUCCESS;
static PHP_INI_MH(OnIniUpdate)
{
if (new_value) *(char**)mh_arg1 = new_value;
iniUpdated=1;
return SUCCESS;
}
PHP_INI_BEGIN()

View File

@ -287,7 +287,6 @@ php_mbstring_parse_encoding_array(zval *array, int **return_list, int *return_si
static PHP_INI_MH(OnUpdate_mbstring_detect_order)
{
int *list, size;
TSRMLS_FETCH();
if (php_mbstring_parse_encoding_list(new_value, new_value_length, &list, &size, 1)) {
if (MBSTRG(detect_order_list) != NULL) {
@ -305,7 +304,6 @@ static PHP_INI_MH(OnUpdate_mbstring_detect_order)
static PHP_INI_MH(OnUpdate_mbstring_http_input)
{
int *list, size;
TSRMLS_FETCH();
if (php_mbstring_parse_encoding_list(new_value, new_value_length, &list, &size, 1)) {
if (MBSTRG(http_input_list) != NULL) {
@ -323,7 +321,6 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input)
static PHP_INI_MH(OnUpdate_mbstring_http_output)
{
enum mbfl_no_encoding no_encoding;
TSRMLS_FETCH();
no_encoding = mbfl_name2no_encoding(new_value);
if (no_encoding != mbfl_no_encoding_invalid) {
@ -341,7 +338,6 @@ static PHP_INI_MH(OnUpdate_mbstring_http_output)
static PHP_INI_MH(OnUpdate_mbstring_internal_encoding)
{
enum mbfl_no_encoding no_encoding;
TSRMLS_FETCH();
no_encoding = mbfl_name2no_encoding(new_value);
if (no_encoding != mbfl_no_encoding_invalid) {
@ -358,8 +354,6 @@ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding)
static PHP_INI_MH(OnUpdate_mbstring_substitute_character)
{
TSRMLS_FETCH();
if (new_value != NULL) {
if (strcasecmp("none", new_value) == 0) {
MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE;
@ -428,7 +422,6 @@ PHP_MINIT_FUNCTION(mbstring)
PHP_MSHUTDOWN_FUNCTION(mbstring)
{
TSRMLS_FETCH();
UNREGISTER_INI_ENTRIES();
if (MBSTRG(http_input_list)) {
@ -477,8 +470,6 @@ PHP_RINIT_FUNCTION(mbstring)
PHP_RSHUTDOWN_FUNCTION(mbstring)
{
TSRMLS_FETCH();
if (MBSTRG(current_detect_order_list) != NULL) {
efree(MBSTRG(current_detect_order_list));
MBSTRG(current_detect_order_list) = NULL;

View File

@ -139,8 +139,8 @@ PHP_MINFO_FUNCTION(mcal)
{
char tmp[128];
php_info_print_table_start();
php_info_print_table_row(2, "MCAL Support", "enabled" );
php_info_print_table_start();
php_info_print_table_row(2, "MCAL Support", "enabled" );
#ifdef MCALVER
snprintf(tmp, 128, "%s<BR>%d", CALVER, MCALVER);
#else

View File

@ -348,8 +348,6 @@ PHP_RINIT_FUNCTION(mssql)
PHP_RSHUTDOWN_FUNCTION(mssql)
{
TSRMLS_FETCH();
STR_FREE(MS_SQL_G(appname));
if (MS_SQL_G(server_message)) {
STR_FREE(MS_SQL_G(server_message));
@ -360,7 +358,6 @@ PHP_RSHUTDOWN_FUNCTION(mssql)
PHP_MINFO_FUNCTION(mssql)
{
char buf[32];
TSRMLS_FETCH();
php_info_print_table_start();
php_info_print_table_header(2, "MSSQL Support", "enabled");

View File

@ -112,9 +112,6 @@ PHP_MINIT_FUNCTION(muscat)
PHP_MSHUTDOWN_FUNCTION(muscat)
{
/* Remove comments if you have entries in php.ini
UNREGISTER_INI_ENTRIES();
*/
return SUCCESS;
}

View File

@ -211,10 +211,8 @@ static void _free_mysql_result(zend_rsrc_list_entry *rsrc)
/* {{{ php_mysql_set_default_link
*/
static void php_mysql_set_default_link(int id)
static void php_mysql_set_default_link(int id TSRMLS_DC)
{
TSRMLS_FETCH();
if (MySG(default_link)!=-1) {
zend_list_delete(MySG(default_link));
}
@ -261,8 +259,6 @@ static void _close_mysql_plink(zend_rsrc_list_entry *rsrc)
*/
static PHP_INI_MH(OnMySQLPort)
{
TSRMLS_FETCH();
if (new_value==NULL) { /* default port */
#ifndef PHP_WIN32
struct servent *serv_ptr;
@ -360,7 +356,6 @@ PHP_RINIT_FUNCTION(mysql)
*/
PHP_RSHUTDOWN_FUNCTION(mysql)
{
TSRMLS_FETCH();
if (MySG(connect_error)!=NULL) {
efree(MySG(connect_error));
}
@ -373,7 +368,6 @@ PHP_RSHUTDOWN_FUNCTION(mysql)
PHP_MINFO_FUNCTION(mysql)
{
char buf[32];
TSRMLS_FETCH();
php_info_print_table_start();
php_info_print_table_header(2, "MySQL Support", "enabled");
@ -606,7 +600,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if (ptr && (type==le_link || type==le_plink)) {
zend_list_addref(link);
return_value->value.lval = link;
php_mysql_set_default_link(link);
php_mysql_set_default_link(link TSRMLS_CC);
return_value->type = IS_RESOURCE;
efree(hashed_details);
MYSQL_DO_CONNECT_CLEANUP();
@ -656,7 +650,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
efree(hashed_details);
php_mysql_set_default_link(return_value->value.lval);
php_mysql_set_default_link(return_value->value.lval TSRMLS_CC);
MYSQL_DO_CONNECT_CLEANUP();
}
/* }}} */
@ -953,11 +947,10 @@ PHP_FUNCTION(mysql_drop_db)
/* {{{ php_mysql_do_query_general
*/
static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link_id, zval **db, int use_store, zval *return_value)
static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link_id, zval **db, int use_store, zval *return_value TSRMLS_DC)
{
php_mysql_conn *mysql;
MYSQL_RES *mysql_result;
TSRMLS_FETCH();
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, link_id, "MySQL-Link", le_link, le_plink);
@ -1039,7 +1032,7 @@ static void php_mysql_do_query(INTERNAL_FUNCTION_PARAMETERS, int use_store)
WRONG_PARAM_COUNT;
break;
}
php_mysql_do_query_general(query, mysql_link, id, NULL, use_store, return_value);
php_mysql_do_query_general(query, mysql_link, id, NULL, use_store, return_value TSRMLS_CC);
}
/* }}} */
@ -1089,7 +1082,7 @@ PHP_FUNCTION(mysql_db_query)
zend_error(E_NOTICE, "%s is deprecated; use mysql_select_db() and mysql_query() instead", get_active_function_name());
php_mysql_do_query_general(query, mysql_link, id, db, MYSQL_STORE_RESULT, return_value);
php_mysql_do_query_general(query, mysql_link, id, db, MYSQL_STORE_RESULT, return_value TSRMLS_CC);
}
/* }}} */

View File

@ -94,11 +94,6 @@ PHP_MINIT_FUNCTION(ncurses)
*/
PHP_MSHUTDOWN_FUNCTION(ncurses)
{
/* Remove comments if you have entries in php.ini
UNREGISTER_INI_ENTRIES();
endwin();
*/
return SUCCESS;
}
/* }}} */

View File

@ -140,7 +140,6 @@ PHP_MINFO_FUNCTION(notes)
{
php_info_print_table_start();
php_info_print_table_row(2, "Lotus Notes Database Support", "enabled");
php_info_print_table_end();
}

View File

@ -535,8 +535,6 @@ static int _server_pcleanup(oci_server *server)
PHP_MSHUTDOWN_FUNCTION(oci)
{
TSRMLS_FETCH();
OCI(shutdown) = 1;
oci_debug("START php_mshutdown_oci");

View File

@ -467,8 +467,6 @@ PHP_RSHUTDOWN_FUNCTION(odbc)
PHP_MSHUTDOWN_FUNCTION(odbc)
{
TSRMLS_FETCH();
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
@ -476,7 +474,6 @@ PHP_MSHUTDOWN_FUNCTION(odbc)
PHP_MINFO_FUNCTION(odbc)
{
char buf[32];
TSRMLS_FETCH();
php_info_print_table_start();
php_info_print_table_header(2, "ODBC Support", "enabled");

View File

@ -361,11 +361,8 @@ PHP_RINIT_FUNCTION(oracle)
*/
PHP_MSHUTDOWN_FUNCTION(oracle)
{
TSRMLS_FETCH();
zend_hash_destroy(ORA(conns));
free(ORA(conns));
return SUCCESS;
}
/* }}} */
@ -1570,7 +1567,6 @@ PHP_FUNCTION(ora_errorcode)
*/
PHP_MINFO_FUNCTION(oracle)
{
php_info_print_table_start();
php_info_print_table_row(2, "Oracle Support", "enabled");
#ifndef PHP_WIN32

View File

@ -107,8 +107,6 @@ PHP_RINIT_FUNCTION(pfpro)
PHP_RSHUTDOWN_FUNCTION(pfpro)
{
TSRMLS_FETCH();
if (PFPROG(initialized) == 1) {
pfproCleanup();
}

View File

@ -293,7 +293,6 @@ PHP_RINIT_FUNCTION(pgsql)
*/
PHP_RSHUTDOWN_FUNCTION(pgsql)
{
TSRMLS_FETCH();
zend_hash_apply(&EG(persistent_list), (apply_func_t) _rollback_transactions);
return SUCCESS;
}
@ -304,7 +303,6 @@ PHP_RSHUTDOWN_FUNCTION(pgsql)
PHP_MINFO_FUNCTION(pgsql)
{
char buf[32];
TSRMLS_FETCH();
php_info_print_table_start();
php_info_print_table_header(2, "PostgreSQL Support", "enabled");

View File

@ -91,7 +91,6 @@ PHP_MINIT_FUNCTION(qtdom)
PHP_MSHUTDOWN_FUNCTION(qtdom)
{
qdom_shutdown();
return SUCCESS;
}
/* }}} */

View File

@ -84,19 +84,15 @@ PHP_MINIT_FUNCTION(recode)
PHP_MSHUTDOWN_FUNCTION(recode)
{
TSRMLS_FETCH();
if (ReSG(outer))
if (ReSG(outer)) {
recode_delete_outer(ReSG(outer));
}
return SUCCESS;
}
PHP_MINFO_FUNCTION(recode)
{
TSRMLS_FETCH();
php_info_print_table_start();
php_info_print_table_row(2, "Recode Support", "enabled");
php_info_print_table_row(2, "Revision", "$Revision$");

View File

@ -352,7 +352,6 @@ static PHP_INI_MH(OnTypelibFileChange)
char *typelib_name_buffer;
char *strtok_buf = NULL;
int interactive;
TSRMLS_FETCH();
interactive = CG(interactive);

View File

@ -106,10 +106,11 @@ php_java_globals java_globals;
static zend_class_entry java_class_entry;
static PHP_INI_MH(OnIniUpdate) {
if (new_value) *(char**)mh_arg1 = new_value;
iniUpdated=1;
return SUCCESS;
static PHP_INI_MH(OnIniUpdate)
{
if (new_value) *(char**)mh_arg1 = new_value;
iniUpdated=1;
return SUCCESS;
}
PHP_INI_BEGIN()

View File

@ -239,22 +239,16 @@ PHP_MINIT_FUNCTION(sablot)
PHP_MSHUTDOWN_FUNCTION(sablot)
{
TSRMLS_FETCH();
if (SABLOTG(processor)) {
SablotUnregHandler(SABLOTG(processor), HLR_MESSAGE, NULL, NULL);
SablotDestroyProcessor(SABLOTG(processor));
}
return SUCCESS;
}
PHP_RSHUTDOWN_FUNCTION(sablot)
{
TSRMLS_FETCH();
SABLOT_FREE_ERROR_HANDLE(SABLOTG_HANDLE);
return SUCCESS;
}

View File

@ -80,14 +80,14 @@ static function_entry satellite_functions[] = {
* module entry
*/
zend_module_entry satellite_module_entry = {
"satellite",
satellite_functions,
PHP_MINIT(satellite), /* module startup */
PHP_MSHUTDOWN(satellite), /* module shutdown */
NULL, /* request startup */
NULL, /* request shutdown */
PHP_MINFO(satellite), /* module info */
STANDARD_MODULE_PROPERTIES
"satellite",
satellite_functions,
PHP_MINIT(satellite), /* module startup */
PHP_MSHUTDOWN(satellite), /* module shutdown */
NULL, /* request startup */
NULL, /* request shutdown */
PHP_MINFO(satellite), /* module info */
STANDARD_MODULE_PROPERTIES
};
/*
@ -116,9 +116,7 @@ PHP_MSHUTDOWN_FUNCTION(satellite)
{
TypeManager_Shutdown();
orbit_corba_shutdown();
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
@ -132,7 +130,7 @@ PHP_MINFO_FUNCTION(satellite)
php_info_print_table_header(2, "CORBA support via Satellite", "enabled");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
DISPLAY_INI_ENTRIES();
}
/* instruct the type manager to load an IDL file if not already loaded */

View File

@ -85,8 +85,6 @@ static const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC);
static PHP_INI_MH(OnUpdateSaveHandler)
{
TSRMLS_FETCH();
PS(mod) = _php_find_ps_module(new_value TSRMLS_CC);
if(!PS(mod)) {
php_error(E_ERROR,"Cannot find save handler %s",new_value);
@ -97,8 +95,6 @@ static PHP_INI_MH(OnUpdateSaveHandler)
static PHP_INI_MH(OnUpdateSerializer)
{
TSRMLS_FETCH();
PS(serializer) = _php_find_ps_serializer(new_value TSRMLS_CC);
if(!PS(serializer)) {
php_error(E_ERROR,"Cannot find serialization handler %s",new_value);
@ -1404,8 +1400,6 @@ PHP_FUNCTION(session_write_close)
PHP_RSHUTDOWN_FUNCTION(session)
{
TSRMLS_FETCH();
php_session_flush(TSRMLS_C);
php_rshutdown_session_globals(TSRMLS_C);
return SUCCESS;
@ -1436,7 +1430,6 @@ PHP_MSHUTDOWN_FUNCTION(session)
PHP_MINFO_FUNCTION(session)
{
php_info_print_table_start();
php_info_print_table_row(2, "Session Support", "enabled" );
php_info_print_table_end();

View File

@ -59,9 +59,6 @@ PHP_INI_END()
*/
PHP_MINIT_FUNCTION(extname)
{
/* Remove comments if you have entries in php.ini
REGISTER_INI_ENTRIES();
*/
return SUCCESS;
}
/* }}} */
@ -70,9 +67,6 @@ PHP_MINIT_FUNCTION(extname)
*/
PHP_MSHUTDOWN_FUNCTION(extname)
{
/* Remove comments if you have entries in php.ini
UNREGISTER_INI_ENTRIES();
*/
return SUCCESS;
}
/* }}} */

View File

@ -52,8 +52,6 @@ enum {
static PHP_INI_MH(OnChangeCallback)
{
TSRMLS_FETCH();
if (ASSERTG(callback)) {
zval_ptr_dtor(&ASSERTG(callback));
} else {
@ -102,8 +100,6 @@ PHP_MINIT_FUNCTION(assert)
PHP_MSHUTDOWN_FUNCTION(assert)
{
TSRMLS_FETCH();
if (ASSERTG(callback)) {
zval_ptr_dtor(&ASSERTG(callback));
}
@ -112,8 +108,6 @@ PHP_MSHUTDOWN_FUNCTION(assert)
PHP_RSHUTDOWN_FUNCTION(assert)
{
TSRMLS_FETCH();
if (ASSERTG(callback)) {
zval_ptr_dtor(&ASSERTG(callback));
ASSERTG(callback) = NULL;

View File

@ -618,7 +618,6 @@ static PHP_INI_MH(OnUpdateSafeModeProtectedEnvVars)
char *protected_vars, *protected_var;
char *token_buf;
int dummy=1;
TSRMLS_FETCH();
protected_vars = estrndup(new_value, new_value_length);
zend_hash_clean(&BG(sm_protected_env_vars));
@ -635,8 +634,6 @@ static PHP_INI_MH(OnUpdateSafeModeProtectedEnvVars)
static PHP_INI_MH(OnUpdateSafeModeAllowedEnvVars)
{
TSRMLS_FETCH();
if (BG(sm_allowed_env_vars)) {
free(BG(sm_allowed_env_vars));
}
@ -799,9 +796,6 @@ PHP_MINIT_FUNCTION(basic)
PHP_MSHUTDOWN_FUNCTION(basic)
{
TSRMLS_FETCH();
#ifdef ZTS
ts_free_id(basic_globals_id);
#else
@ -878,8 +872,6 @@ PHP_RINIT_FUNCTION(basic)
PHP_RSHUTDOWN_FUNCTION(basic)
{
TSRMLS_FETCH();
STR_FREE(BG(strtok_string));
BG(strtok_string) = NULL;
#ifdef HAVE_PUTENV

View File

@ -203,7 +203,7 @@ void php_dl(pval *file, int type, pval *return_value)
PHP_MINFO_FUNCTION(dl)
{
php_info_print_table_row(2, "Dynamic Library Support", "enabled");
php_info_print_table_row(2, "Dynamic Library Support", "enabled");
}
#else

View File

@ -219,8 +219,6 @@ PHP_MINIT_FUNCTION(file)
PHP_MSHUTDOWN_FUNCTION(file)
{
#ifndef ZTS
TSRMLS_FETCH();
file_globals_dtor(&file_globals TSRMLS_CC);
#endif
return SUCCESS;

View File

@ -96,8 +96,6 @@ PHP_RINIT_FUNCTION(filestat)
PHP_RSHUTDOWN_FUNCTION(filestat)
{
TSRMLS_FETCH();
if (BG(CurrentStatFile)) {
efree (BG(CurrentStatFile));
}

View File

@ -752,8 +752,6 @@ PHPAPI void php_msock_destroy(int *data)
PHP_RSHUTDOWN_FUNCTION(fsock)
{
TSRMLS_FETCH();
php_cleanup_sockbuf(0 TSRMLS_CC);
return SUCCESS;
}

View File

@ -42,10 +42,11 @@ PHPAPI extern char *php_ini_opened_path;
static int _display_module_info(zend_module_entry *module, void *arg)
{
int show_info_func = *((int *) arg);
TSRMLS_FETCH();
if (show_info_func && module->info_func) {
php_printf("<h2 align=\"center\"><a name=\"module_%s\">%s</a></h2>\n", module->name, module->name);
module->info_func(module);
module->info_func(module TSRMLS_CC);
} else if (!show_info_func && !module->info_func) {
php_printf("<tr valign=\"baseline\" bgcolor=\"" PHP_CONTENTS_COLOR "\">");
php_printf("<td>");

View File

@ -208,13 +208,17 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char
*/
PHP_MINFO_FUNCTION(mail)
{
#ifdef PHP_WIN32
char *sendmail_path = INI_STR("sendmail_path");
if (!sendmail_path)
php_info_print_table_row(2, "Internal Sendmail Support for Windows 4", "enabled");
else
#ifdef PHP_WIN32
if (!sendmail_path) {
php_info_print_table_row(2, "Internal Sendmail Support for Windows", "enabled");
} else {
php_info_print_table_row(2, "Path to sendmail", sendmail_path);
}
#else
php_info_print_table_row(2, "Path to sendmail", sendmail_path);
#endif
php_info_print_table_row(2, "Path to sendmail", INI_STR("sendmail_path") );
}
/* }}} */

View File

@ -102,8 +102,6 @@ PHP_MINIT_FUNCTION(regex)
PHP_MSHUTDOWN_FUNCTION(regex)
{
TSRMLS_FETCH();
zend_hash_destroy(&REG(ht_rc));
return SUCCESS;
}

View File

@ -160,9 +160,7 @@ PHP_MINIT_FUNCTION(localeconv)
PHP_MSHUTDOWN_FUNCTION(localeconv)
{
tsrm_mutex_free( locale_mutex );
locale_mutex = NULL;
return SUCCESS;
}
/* }}} */

View File

@ -116,8 +116,6 @@ PHP_RINIT_FUNCTION(syslog)
PHP_RSHUTDOWN_FUNCTION(syslog)
{
TSRMLS_FETCH();
if (BG(syslog_device)) {
efree(BG(syslog_device));
}

View File

@ -47,7 +47,6 @@ static PHP_INI_MH(OnUpdateTags)
char *key;
char *lasts;
char *tmp;
TSRMLS_FETCH();
ctx = &BG(url_adapt_state_ex);
@ -874,7 +873,6 @@ PHP_RINIT_FUNCTION(url_scanner)
PHP_RSHUTDOWN_FUNCTION(url_scanner)
{
url_adapt_state_ex_t *ctx;
TSRMLS_FETCH();
ctx = &BG(url_adapt_state_ex);
@ -901,8 +899,6 @@ PHP_MINIT_FUNCTION(url_scanner)
PHP_MSHUTDOWN_FUNCTION(url_scanner)
{
TSRMLS_FETCH();
UNREGISTER_INI_ENTRIES();
zend_hash_destroy(BG(url_adapt_state_ex).tags);
free(BG(url_adapt_state_ex).tags);

View File

@ -1306,7 +1306,7 @@ PHP_FUNCTION(sybase_affected_rows)
PHP_MINFO_FUNCTION(sybase)
{
char maxp[32],maxl[32];
char maxp[32], maxl[32];
if (php_sybase_module.max_persistent==-1) {
snprintf(maxp, 31, "%ld/unlimited", php_sybase_module.num_persistent );

View File

@ -367,8 +367,6 @@ PHP_MSHUTDOWN_FUNCTION(sybase)
PHP_RSHUTDOWN_FUNCTION(sybase)
{
TSRMLS_FETCH();
efree(SybCtG(appname));
STR_FREE(SybCtG(server_message));
return SUCCESS;
@ -1652,7 +1650,6 @@ PHP_FUNCTION(sybase_affected_rows)
PHP_MINFO_FUNCTION(sybase)
{
char buf[32];
TSRMLS_FETCH();
php_info_print_table_start();
php_info_print_table_header(2, "Sybase_CT Support", "enabled" );

View File

@ -137,12 +137,9 @@ void vclose();
PHP_RSHUTDOWN_FUNCTION(vpopmail)
{
TSRMLS_FETCH();
if (VPOPMAILG(vpopmail_open) != 0) {
vclose();
}
return SUCCESS;
}

View File

@ -229,12 +229,11 @@ PHP_RSHUTDOWN_FUNCTION(xml)
PHP_MINFO_FUNCTION(xml)
{
php_info_print_table_start();
php_info_print_table_row(2, "XML Support", "active");
php_info_print_table_row(2, "XML Namespace Support", "active");
php_info_print_table_row(2, "EXPAT Version",XML_ExpatVersion());
php_info_print_table_end();
php_info_print_table_start();
php_info_print_table_row(2, "XML Support", "active");
php_info_print_table_row(2, "XML Namespace Support", "active");
php_info_print_table_row(2, "EXPAT Version",XML_ExpatVersion());
php_info_print_table_end();
}
/* }}} */

View File

@ -394,7 +394,8 @@ PHP_RINIT_FUNCTION(yp)
YP(error) = 0;
}
PHP_MINFO_FUNCTION(yp) {
PHP_MINFO_FUNCTION(yp)
{
php_info_print_table_start();
php_info_print_table_row(2, "YP Support", "enabled");
php_info_print_table_end();

View File

@ -204,8 +204,6 @@ PHP_RINIT_FUNCTION(zlib)
PHP_MSHUTDOWN_FUNCTION(zlib)
{
#if HAVE_FOPENCOOKIE
TSRMLS_FETCH();
if(PG(allow_url_fopen)) {
php_unregister_url_wrapper("zlib");
}

View File

@ -91,8 +91,6 @@ static void php_build_argv(char *s, zval *track_vars_array TSRMLS_DC);
*/
static PHP_INI_MH(OnSetPrecision)
{
TSRMLS_FETCH();
EG(precision) = atoi(new_value);
return SUCCESS;
}
@ -119,8 +117,6 @@ static PHP_INI_MH(OnChangeMemoryLimit)
*/
static PHP_INI_MH(OnUpdateErrorReporting)
{
TSRMLS_FETCH();
if (!new_value) {
EG(error_reporting) = E_ALL & ~E_NOTICE;
} else {
@ -151,8 +147,6 @@ static void php_disable_functions()
*/
static PHP_INI_MH(OnUpdateTimeout)
{
TSRMLS_FETCH();
EG(timeout_seconds) = atoi(new_value);
if (stage==PHP_INI_STAGE_STARTUP) {
/* Don't set a timeout on startup, only per-request */

View File

@ -182,7 +182,6 @@ PHP_MINFO_FUNCTION(apache)
extern char *user_name;
extern gid_t group_id;
extern int max_requests_per_child;
TSRMLS_FETCH();
serv = ((request_rec *) SG(server_context))->server;