Skip to content

Commit 797a079

Browse files
committed
More TSRMLS_FETCH work, and a bit of cleanup
1 parent e8ac55d commit 797a079

File tree

58 files changed

+81
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+81
-208
lines changed

ext/bcmath/bcmath.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ PHP_RINIT_FUNCTION(bcmath)
126126

127127
PHP_MINFO_FUNCTION(bcmath)
128128
{
129-
php_info_print_table_start();
130-
php_info_print_table_row(2, "BCMath support", "enabled");
131-
php_info_print_table_end();
129+
php_info_print_table_start();
130+
php_info_print_table_row(2, "BCMath support", "enabled");
131+
php_info_print_table_end();
132132
}
133133

134134
/* {{{ proto string bcadd(string left_operand, string right_operand [, int scale])

ext/calendar/calendar.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ function_entry calendar_functions[] = {
5757

5858

5959
zend_module_entry calendar_module_entry = {
60-
"calendar",
61-
calendar_functions,
62-
PHP_MINIT(calendar),
63-
NULL,
64-
NULL,
65-
NULL,
66-
PHP_MINFO(calendar),
67-
STANDARD_MODULE_PROPERTIES,
60+
"calendar",
61+
calendar_functions,
62+
PHP_MINIT(calendar),
63+
NULL,
64+
NULL,
65+
NULL,
66+
PHP_MINFO(calendar),
67+
STANDARD_MODULE_PROPERTIES,
6868
};
6969

7070
#ifdef COMPILE_DL_CALENDAR

ext/com/COM.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ static PHP_INI_MH(OnTypelibFileChange)
352352
char *typelib_name_buffer;
353353
char *strtok_buf = NULL;
354354
int interactive;
355-
TSRMLS_FETCH();
356355

357356
interactive = CG(interactive);
358357

ext/cpdf/cpdf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ PHP_MINFO_FUNCTION(cpdf) {
205205
php_info_print_table_end();
206206
}
207207

208-
PHP_MSHUTDOWN_FUNCTION(cpdf){
208+
PHP_MSHUTDOWN_FUNCTION(cpdf)
209+
{
209210
return SUCCESS;
210211
}
211212

ext/crack/crack.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ ZEND_MINIT_FUNCTION(crack)
104104
ZEND_MSHUTDOWN_FUNCTION(crack)
105105
{
106106
UNREGISTER_INI_ENTRIES();
107-
108107
return SUCCESS;
109108
}
110109

@@ -118,12 +117,9 @@ ZEND_RINIT_FUNCTION(crack)
118117

119118
ZEND_RSHUTDOWN_FUNCTION(crack)
120119
{
121-
TSRMLS_FETCH();
122-
123120
if (NULL != CRACKG(last_message)) {
124121
efree(CRACKG(last_message));
125122
}
126-
127123
return SUCCESS;
128124
}
129125

ext/ctype/ctype.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ ZEND_GET_MODULE(ctype)
8585
*/
8686
PHP_MINFO_FUNCTION(ctype)
8787
{
88-
TSRMLS_FETCH();
89-
9088
php_info_print_table_start();
9189
php_info_print_table_row(2, "ctype functions", "enabled (experimental)");
9290
php_info_print_table_end();

ext/dbplus/dbplus.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ PHP_MINIT_FUNCTION(dbplus)
147147

148148
PHP_MSHUTDOWN_FUNCTION(dbplus)
149149
{
150-
/* Remove comments if you have entries in php.ini
151-
UNREGISTER_INI_ENTRIES();
152-
*/
153150
return SUCCESS;
154151
}
155152

ext/ereg/ereg.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ PHP_MINIT_FUNCTION(regex)
102102

103103
PHP_MSHUTDOWN_FUNCTION(regex)
104104
{
105-
TSRMLS_FETCH();
106-
107105
zend_hash_destroy(&REG(ht_rc));
108106
return SUCCESS;
109107
}

ext/exif/exif.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ ZEND_GET_MODULE(exif)
142142

143143
/* {{{ PHP_MINFO_FUNCTION
144144
*/
145-
PHP_MINFO_FUNCTION(exif) {
145+
PHP_MINFO_FUNCTION(exif)
146+
{
146147
php_info_print_table_start();
147148
php_info_print_table_row(2, "EXIF Support", "enabled" );
148149
php_info_print_table_end();

ext/fbsql/php_fbsql.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,6 @@ PHP_RSHUTDOWN_FUNCTION(fbsql)
405405
PHP_MINFO_FUNCTION(fbsql)
406406
{
407407
char buf[32];
408-
TSRMLS_FETCH();
409408

410409
php_info_print_table_start();
411410
php_info_print_table_header(2, "FrontBase support", "enabled");

ext/filepro/filepro.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,11 @@ PHP_MSHUTDOWN_FUNCTION(filepro)
120120
SET_MUTEX(fp_mutex);
121121
numthreads--;
122122
if (!numthreads){
123-
if (!TlsFree(FPTls)){
124-
FREE_MUTEX(fp_mutex);
125-
return 0;
126-
}}
123+
if (!TlsFree(FPTls)){
124+
FREE_MUTEX(fp_mutex);
125+
return 0;
126+
}
127+
}
127128
FREE_MUTEX(fp_mutex);
128129
#endif
129130
#endif

ext/ftp/php_ftp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ PHP_MINIT_FUNCTION(ftp)
9898

9999
PHP_MINFO_FUNCTION(ftp)
100100
{
101-
php_info_print_table_start();
102-
php_info_print_table_row(2, "FTP support", "enabled");
103-
php_info_print_table_end();
101+
php_info_print_table_start();
102+
php_info_print_table_row(2, "FTP support", "enabled");
103+
php_info_print_table_end();
104104
}
105105

106106

ext/gmp/gmp.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@ ZEND_MINIT_FUNCTION(gmp)
154154
*/
155155
ZEND_MSHUTDOWN_FUNCTION(gmp)
156156
{
157-
/* Remove comments if you have entries in php.ini
158-
UNREGISTER_INI_ENTRIES();
159-
*/
160157
return SUCCESS;
161158
}
162159
/* }}} */

ext/hyperwave/hw.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ static void php_hw_init_globals(zend_hw_globals *hw_globals)
196196

197197
static PHP_INI_MH(OnHyperwavePort)
198198
{
199-
TSRMLS_FETCH();
200-
201199
if (new_value==NULL) {
202200
HwSG(default_port) = HG_SERVER_PORT;
203201
} else {

ext/imap/php_imap.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ PHP_RSHUTDOWN_FUNCTION(imap)
310310
{
311311
ERRORLIST *ecur = NIL;
312312
STRINGLIST *acur = NIL;
313-
TSRMLS_FETCH();
314313

315314
if (IMAPG(imap_errorstack) != NIL) {
316315
/* output any remaining errors at their original error level */

ext/ingres_ii/ii.c

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ function_entry ii_functions[] = {
6767
};
6868

6969
zend_module_entry ingres_ii_module_entry = {
70-
"ingres_ii",
71-
ii_functions,
72-
PHP_MINIT(ii),
73-
PHP_MSHUTDOWN(ii),
74-
PHP_RINIT(ii),
75-
PHP_RSHUTDOWN(ii),
76-
PHP_MINFO(ii),
77-
STANDARD_MODULE_PROPERTIES
70+
"ingres_ii",
71+
ii_functions,
72+
PHP_MINIT(ii),
73+
PHP_MSHUTDOWN(ii),
74+
PHP_RINIT(ii),
75+
PHP_RSHUTDOWN(ii),
76+
PHP_MINFO(ii),
77+
STANDARD_MODULE_PROPERTIES
7878
};
7979

8080
#ifdef COMPILE_DL_INGRES_II
@@ -312,8 +312,6 @@ PHP_RINIT_FUNCTION(ii)
312312
*/
313313
PHP_RSHUTDOWN_FUNCTION(ii)
314314
{
315-
TSRMLS_FETCH();
316-
317315
if (IIG(default_link)!=-1) {
318316
zend_list_delete(IIG(default_link));
319317
IIG(default_link) = -1;
@@ -326,7 +324,6 @@ PHP_RSHUTDOWN_FUNCTION(ii)
326324
PHP_MINFO_FUNCTION(ii)
327325
{
328326
char buf[32];
329-
TSRMLS_FETCH();
330327

331328
php_info_print_table_start();
332329
php_info_print_table_header(2, "Ingres II Support", "enabled");

ext/interbase/interbase.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,6 @@ PHP_MSHUTDOWN_FUNCTION(ibase)
554554

555555
PHP_RSHUTDOWN_FUNCTION(ibase)
556556
{
557-
TSRMLS_FETCH();
558-
559557
if (IBG(timestampformat))
560558
DL_FREE(IBG(timestampformat));
561559
IBG(timestampformat) = NULL;

ext/java/java.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ php_java_globals java_globals;
106106

107107
static zend_class_entry java_class_entry;
108108

109-
static PHP_INI_MH(OnIniUpdate) {
110-
if (new_value) *(char**)mh_arg1 = new_value;
111-
iniUpdated=1;
112-
return SUCCESS;
109+
static PHP_INI_MH(OnIniUpdate)
110+
{
111+
if (new_value) *(char**)mh_arg1 = new_value;
112+
iniUpdated=1;
113+
return SUCCESS;
113114
}
114115

115116
PHP_INI_BEGIN()

ext/mbstring/mbstring.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ php_mbstring_parse_encoding_array(zval *array, int **return_list, int *return_si
287287
static PHP_INI_MH(OnUpdate_mbstring_detect_order)
288288
{
289289
int *list, size;
290-
TSRMLS_FETCH();
291290

292291
if (php_mbstring_parse_encoding_list(new_value, new_value_length, &list, &size, 1)) {
293292
if (MBSTRG(detect_order_list) != NULL) {
@@ -305,7 +304,6 @@ static PHP_INI_MH(OnUpdate_mbstring_detect_order)
305304
static PHP_INI_MH(OnUpdate_mbstring_http_input)
306305
{
307306
int *list, size;
308-
TSRMLS_FETCH();
309307

310308
if (php_mbstring_parse_encoding_list(new_value, new_value_length, &list, &size, 1)) {
311309
if (MBSTRG(http_input_list) != NULL) {
@@ -323,7 +321,6 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input)
323321
static PHP_INI_MH(OnUpdate_mbstring_http_output)
324322
{
325323
enum mbfl_no_encoding no_encoding;
326-
TSRMLS_FETCH();
327324

328325
no_encoding = mbfl_name2no_encoding(new_value);
329326
if (no_encoding != mbfl_no_encoding_invalid) {
@@ -341,7 +338,6 @@ static PHP_INI_MH(OnUpdate_mbstring_http_output)
341338
static PHP_INI_MH(OnUpdate_mbstring_internal_encoding)
342339
{
343340
enum mbfl_no_encoding no_encoding;
344-
TSRMLS_FETCH();
345341

346342
no_encoding = mbfl_name2no_encoding(new_value);
347343
if (no_encoding != mbfl_no_encoding_invalid) {
@@ -358,8 +354,6 @@ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding)
358354

359355
static PHP_INI_MH(OnUpdate_mbstring_substitute_character)
360356
{
361-
TSRMLS_FETCH();
362-
363357
if (new_value != NULL) {
364358
if (strcasecmp("none", new_value) == 0) {
365359
MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE;
@@ -428,7 +422,6 @@ PHP_MINIT_FUNCTION(mbstring)
428422

429423
PHP_MSHUTDOWN_FUNCTION(mbstring)
430424
{
431-
TSRMLS_FETCH();
432425
UNREGISTER_INI_ENTRIES();
433426

434427
if (MBSTRG(http_input_list)) {
@@ -477,8 +470,6 @@ PHP_RINIT_FUNCTION(mbstring)
477470

478471
PHP_RSHUTDOWN_FUNCTION(mbstring)
479472
{
480-
TSRMLS_FETCH();
481-
482473
if (MBSTRG(current_detect_order_list) != NULL) {
483474
efree(MBSTRG(current_detect_order_list));
484475
MBSTRG(current_detect_order_list) = NULL;

ext/mcal/php_mcal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ PHP_MINFO_FUNCTION(mcal)
139139
{
140140
char tmp[128];
141141

142-
php_info_print_table_start();
143-
php_info_print_table_row(2, "MCAL Support", "enabled" );
142+
php_info_print_table_start();
143+
php_info_print_table_row(2, "MCAL Support", "enabled" );
144144
#ifdef MCALVER
145145
snprintf(tmp, 128, "%s<BR>%d", CALVER, MCALVER);
146146
#else

ext/mssql/php_mssql.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,6 @@ PHP_RINIT_FUNCTION(mssql)
348348

349349
PHP_RSHUTDOWN_FUNCTION(mssql)
350350
{
351-
TSRMLS_FETCH();
352-
353351
STR_FREE(MS_SQL_G(appname));
354352
if (MS_SQL_G(server_message)) {
355353
STR_FREE(MS_SQL_G(server_message));
@@ -360,7 +358,6 @@ PHP_RSHUTDOWN_FUNCTION(mssql)
360358
PHP_MINFO_FUNCTION(mssql)
361359
{
362360
char buf[32];
363-
TSRMLS_FETCH();
364361

365362
php_info_print_table_start();
366363
php_info_print_table_header(2, "MSSQL Support", "enabled");

ext/muscat/muscat.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ PHP_MINIT_FUNCTION(muscat)
112112

113113
PHP_MSHUTDOWN_FUNCTION(muscat)
114114
{
115-
/* Remove comments if you have entries in php.ini
116-
UNREGISTER_INI_ENTRIES();
117-
*/
118115
return SUCCESS;
119116
}
120117

0 commit comments

Comments
 (0)