summaryrefslogtreecommitdiff
path: root/ext/standard
diff options
context:
space:
mode:
authorSebastian Bergmann <sebastian@php.net>2003-03-25 08:07:13 +0000
committerSebastian Bergmann <sebastian@php.net>2003-03-25 08:07:13 +0000
commit5ca078779a7cde0f3a4a9b0cc8b77abd5177a1d7 (patch)
tree4aed82d43faf1aa9cf1f7080dcc1e0197542e9d3 /ext/standard
parentb671380b6b5b6e1f4f235e810afa4199e989d2ba (diff)
downloadphp-git-5ca078779a7cde0f3a4a9b0cc8b77abd5177a1d7.tar.gz
Eliminate some TSRMLS_FETCH() calls. Tested with Win32 build of SAPI/CGI and SAPI/CLI on Win32.
Diffstat (limited to 'ext/standard')
-rw-r--r--ext/standard/aggregation.c4
-rw-r--r--ext/standard/basic_functions.c2
-rw-r--r--ext/standard/credits.c4
-rw-r--r--ext/standard/credits.h2
-rw-r--r--ext/standard/css.c4
-rw-r--r--ext/standard/css.h2
-rw-r--r--ext/standard/datetime.c3
-rw-r--r--ext/standard/datetime.h2
-rw-r--r--ext/standard/head.c8
-rw-r--r--ext/standard/head.h2
-rw-r--r--ext/standard/info.c8
-rw-r--r--ext/standard/info.h2
-rw-r--r--ext/standard/levenshtein.c6
13 files changed, 19 insertions, 30 deletions
diff --git a/ext/standard/aggregation.c b/ext/standard/aggregation.c
index b474172f87..539795ffd9 100644
--- a/ext/standard/aggregation.c
+++ b/ext/standard/aggregation.c
@@ -100,7 +100,7 @@ static void aggregate_methods(zend_class_entry *ce, zend_class_entry *from_ce, i
}
#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
else if (aggr_type == AGGREGATE_BY_REGEXP) {
- if ((re = pcre_get_compiled_regex(Z_STRVAL_P(aggr_filter), &re_extra, &re_options)) == NULL) {
+ if ((re = pcre_get_compiled_regex(Z_STRVAL_P(aggr_filter), &re_extra, &re_options TSRMLS_CC)) == NULL) {
return;
}
}
@@ -206,7 +206,7 @@ static void aggregate_properties(zval *obj, zend_class_entry *from_ce, int aggr_
}
#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
else if (aggr_type == AGGREGATE_BY_REGEXP) {
- if ((re = pcre_get_compiled_regex(Z_STRVAL_P(aggr_filter), &re_extra, &re_options)) == NULL) {
+ if ((re = pcre_get_compiled_regex(Z_STRVAL_P(aggr_filter), &re_extra, &re_options TSRMLS_CC)) == NULL) {
return;
}
}
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 5da6bbf956..927cc1282c 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -2919,8 +2919,6 @@ PHP_FUNCTION(parse_ini_file)
convert_to_boolean_ex(process_sections);
if (Z_BVAL_PP(process_sections)) {
- TSRMLS_FETCH();
-
BG(active_ini_file_section) = NULL;
ini_parser_cb = (zend_ini_parser_cb_t) php_ini_parser_cb_with_sections;
} else {
diff --git a/ext/standard/credits.c b/ext/standard/credits.c
index 45bcc6818b..6eaf65e72d 100644
--- a/ext/standard/credits.c
+++ b/ext/standard/credits.c
@@ -26,10 +26,8 @@
/* {{{ php_print_credits
*/
-PHPAPI void php_print_credits(int flag)
+PHPAPI void php_print_credits(int flag TSRMLS_DC)
{
- TSRMLS_FETCH();
-
if (flag & PHP_CREDITS_FULLPAGE) {
php_print_info_htmlhead(TSRMLS_C);
}
diff --git a/ext/standard/credits.h b/ext/standard/credits.h
index 6377eed1c8..9e0cb97bb4 100644
--- a/ext/standard/credits.h
+++ b/ext/standard/credits.h
@@ -37,6 +37,6 @@
#endif /* HAVE_CREDITS_DEFS */
-PHPAPI void php_print_credits(int flag);
+PHPAPI void php_print_credits(int flag TSRMLS_DC);
#endif
diff --git a/ext/standard/css.c b/ext/standard/css.c
index e3fb08f55c..31b5455234 100644
--- a/ext/standard/css.c
+++ b/ext/standard/css.c
@@ -24,10 +24,8 @@
/* {{{ php_info_print_css
*/
-PHPAPI void php_info_print_css(void)
+PHPAPI void php_info_print_css(TSRMLS_D)
{
- TSRMLS_FETCH();
-
PUTS("body {background-color: #ffffff; color: #000000;}\n");
PUTS("body, td, th, h1, h2 {font-family: sans-serif;}\n");
PUTS("pre {margin: 0px; font-family: monospace;}\n");
diff --git a/ext/standard/css.h b/ext/standard/css.h
index f809f6022e..c5a5e4b537 100644
--- a/ext/standard/css.h
+++ b/ext/standard/css.h
@@ -21,6 +21,6 @@
#ifndef CSS_H
#define CSS_H
-PHPAPI void php_info_print_css(void);
+PHPAPI void php_info_print_css(TSRMLS_D);
#endif
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c
index cb1b04c523..0c8376ad77 100644
--- a/ext/standard/datetime.c
+++ b/ext/standard/datetime.c
@@ -881,11 +881,10 @@ PHP_FUNCTION(getdate)
/* {{{ php_std_date
Return date string in standard format for http headers */
-char *php_std_date(time_t t)
+char *php_std_date(time_t t TSRMLS_DC)
{
struct tm *tm1, tmbuf;
char *str;
- TSRMLS_FETCH();
tm1 = php_gmtime_r(&t, &tmbuf);
str = emalloc(81);
diff --git a/ext/standard/datetime.h b/ext/standard/datetime.h
index 8aef601797..6f0f368abf 100644
--- a/ext/standard/datetime.h
+++ b/ext/standard/datetime.h
@@ -38,7 +38,7 @@ PHP_FUNCTION(gmstrftime);
PHP_FUNCTION(strtotime);
int php_idate(char format, int timestamp, int gm);
-extern char *php_std_date(time_t t);
+extern char *php_std_date(time_t t TSRMLS_DC);
void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm);
#if HAVE_STRFTIME
void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm);
diff --git a/ext/standard/head.c b/ext/standard/head.c
index c993664269..4d38016129 100644
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@ -55,10 +55,8 @@ PHP_FUNCTION(header)
}
/* }}} */
-PHPAPI int php_header()
+PHPAPI int php_header(TSRMLS_D)
{
- TSRMLS_FETCH();
-
if (sapi_send_headers(TSRMLS_C)==FAILURE || SG(request_info).headers_only) {
return 0; /* don't allow output */
} else {
@@ -98,14 +96,14 @@ PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, t
* pick an expiry date 1 year and 1 second in the past
*/
t = time(NULL) - 31536001;
- dt = php_std_date(t);
+ dt = php_std_date(t TSRMLS_CC);
sprintf(cookie, "Set-Cookie: %s=deleted; expires=%s", name, dt);
efree(dt);
} else {
sprintf(cookie, "Set-Cookie: %s=%s", name, value ? encoded_value : "");
if (expires > 0) {
strcat(cookie, "; expires=");
- dt = php_std_date(expires);
+ dt = php_std_date(expires TSRMLS_CC);
strcat(cookie, dt);
efree(dt);
}
diff --git a/ext/standard/head.h b/ext/standard/head.h
index 59b4b26f6b..9f37d25f9e 100644
--- a/ext/standard/head.h
+++ b/ext/standard/head.h
@@ -26,7 +26,7 @@ PHP_FUNCTION(header);
PHP_FUNCTION(setcookie);
PHP_FUNCTION(headers_sent);
-PHPAPI int php_header(void);
+PHPAPI int php_header(TSRMLS_D);
PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, time_t expires, char *path, int path_len, char *domain, int domain_len, int secure TSRMLS_DC);
#endif
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 0b0a2b36de..3033facb21 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -184,10 +184,10 @@ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC)
/* {{{ php_info_print_style
*/
-void php_info_print_style(void)
+void php_info_print_style(TSRMLS_D)
{
php_printf("<style type=\"text/css\"><!--\n");
- php_info_print_css();
+ php_info_print_css(TSRMLS_C);
php_printf("//--></style>\n");
}
/* }}} */
@@ -357,7 +357,7 @@ PHPAPI void php_print_info_htmlhead(TSRMLS_D)
PUTS("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">\n");
PUTS("<html>");
PUTS("<head>\n");
- php_info_print_style();
+ php_info_print_style(TSRMLS_C);
PUTS("<title>phpinfo()</title>");
/*
php_printf("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\" />\n", charset);
@@ -897,7 +897,7 @@ PHP_FUNCTION(phpcredits)
flag = PHP_CREDITS_ALL;
}
- php_print_credits(flag);
+ php_print_credits(flag TSRMLS_CC);
RETURN_TRUE;
}
/* }}} */
diff --git a/ext/standard/info.h b/ext/standard/info.h
index 69b65b364b..b68615541b 100644
--- a/ext/standard/info.h
+++ b/ext/standard/info.h
@@ -68,7 +68,7 @@ PHPAPI char *php_info_html_esc(char *string TSRMLS_DC);
PHPAPI void php_print_info_htmlhead(TSRMLS_D);
PHPAPI void php_print_info(int flag TSRMLS_DC);
PHPAPI void php_print_style(void);
-PHPAPI void php_info_print_style(void);
+PHPAPI void php_info_print_style(TSRMLS_D);
PHPAPI void php_info_print_table_colspan_header(int num_cols, char *header);
PHPAPI void php_info_print_table_header(int num_cols, ...);
PHPAPI void php_info_print_table_row(int num_cols, ...);
diff --git a/ext/standard/levenshtein.c b/ext/standard/levenshtein.c
index e4a91c5167..edd85ad958 100644
--- a/ext/standard/levenshtein.c
+++ b/ext/standard/levenshtein.c
@@ -75,10 +75,8 @@ static int reference_levdist(const char *s1, int l1,
/* {{{ custom_levdist
*/
-static int custom_levdist(char *str1, char *str2, char *callback_name)
+static int custom_levdist(char *str1, char *str2, char *callback_name TSRMLS_DC)
{
- TSRMLS_FETCH();
-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The general Levenshtein support is not there yet");
/* not there yet */
@@ -132,7 +130,7 @@ PHP_FUNCTION(levenshtein)
convert_to_string_ex(callback_name);
distance = custom_levdist(Z_STRVAL_PP(str1), Z_STRVAL_PP(str2),
- Z_STRVAL_PP(callback_name));
+ Z_STRVAL_PP(callback_name) TSRMLS_CC);
break;
default: