diff options
author | Sebastian Bergmann <sebastian@php.net> | 2003-03-25 08:07:13 +0000 |
---|---|---|
committer | Sebastian Bergmann <sebastian@php.net> | 2003-03-25 08:07:13 +0000 |
commit | 5ca078779a7cde0f3a4a9b0cc8b77abd5177a1d7 (patch) | |
tree | 4aed82d43faf1aa9cf1f7080dcc1e0197542e9d3 | |
parent | b671380b6b5b6e1f4f235e810afa4199e989d2ba (diff) | |
download | php-git-5ca078779a7cde0f3a4a9b0cc8b77abd5177a1d7.tar.gz |
Eliminate some TSRMLS_FETCH() calls. Tested with Win32 build of SAPI/CGI and SAPI/CLI on Win32.
-rw-r--r-- | ext/ftp/ftp.c | 15 | ||||
-rw-r--r-- | ext/pcre/php_pcre.c | 16 | ||||
-rw-r--r-- | ext/pcre/php_pcre.h | 2 | ||||
-rw-r--r-- | ext/session/session.c | 2 | ||||
-rw-r--r-- | ext/standard/aggregation.c | 4 | ||||
-rw-r--r-- | ext/standard/basic_functions.c | 2 | ||||
-rw-r--r-- | ext/standard/credits.c | 4 | ||||
-rw-r--r-- | ext/standard/credits.h | 2 | ||||
-rw-r--r-- | ext/standard/css.c | 4 | ||||
-rw-r--r-- | ext/standard/css.h | 2 | ||||
-rw-r--r-- | ext/standard/datetime.c | 3 | ||||
-rw-r--r-- | ext/standard/datetime.h | 2 | ||||
-rw-r--r-- | ext/standard/head.c | 8 | ||||
-rw-r--r-- | ext/standard/head.h | 2 | ||||
-rw-r--r-- | ext/standard/info.c | 8 | ||||
-rw-r--r-- | ext/standard/info.h | 2 | ||||
-rw-r--r-- | ext/standard/levenshtein.c | 6 | ||||
-rw-r--r-- | main/output.c | 4 | ||||
-rw-r--r-- | main/php_variables.c | 2 | ||||
-rw-r--r-- | sapi/apache/php_apache.c | 2 | ||||
-rw-r--r-- | sapi/apache2handler/php_functions.c | 2 | ||||
-rw-r--r-- | sapi/apache_hooks/php_apache.c | 2 | ||||
-rw-r--r-- | sapi/cgi/cgi_main.c | 4 | ||||
-rw-r--r-- | sapi/cli/php_cli.c | 4 | ||||
-rw-r--r-- | sapi/servlet/servlet.c | 2 |
25 files changed, 48 insertions, 58 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index cc0f2d75ed..fa184aa4a3 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -103,7 +103,7 @@ static int ftp_type(ftpbuf_t *ftp, ftptype_t type); static databuf_t* ftp_getdata(ftpbuf_t *ftp TSRMLS_DC); /* accepts the data connection, returns updated data buffer */ -static databuf_t* data_accept(databuf_t *data, ftpbuf_t *ftp); +static databuf_t* data_accept(databuf_t *data, ftpbuf_t *ftp TSRMLS_DC); /* closes the data connection, returns NULL */ static databuf_t* data_close(ftpbuf_t *ftp, databuf_t *data); @@ -790,7 +790,7 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, goto bail; } - if ((data = data_accept(data, ftp)) == NULL) { + if ((data = data_accept(data, ftp TSRMLS_CC)) == NULL) { goto bail; } @@ -874,7 +874,7 @@ ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, i if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) { goto bail; } - if ((data = data_accept(data, ftp)) == NULL) { + if ((data = data_accept(data, ftp TSRMLS_CC)) == NULL) { goto bail; } @@ -1469,14 +1469,13 @@ bail: /* {{{ data_accept */ databuf_t* -data_accept(databuf_t *data, ftpbuf_t *ftp) +data_accept(databuf_t *data, ftpbuf_t *ftp TSRMLS_DC) { php_sockaddr_storage addr; socklen_t size; #if HAVE_OPENSSL_EXT SSL_CTX *ctx; - TSRMLS_FETCH(); #endif if (data->fd != -1) { @@ -1603,7 +1602,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC) } /* pull data buffer into tmpfile */ - if ((data = data_accept(data, ftp)) == NULL) { + if ((data = data_accept(data, ftp TSRMLS_CC)) == NULL) { goto bail; } size = 0; @@ -1717,7 +1716,7 @@ ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t typ goto bail; } - if ((data = data_accept(data, ftp)) == NULL) { + if ((data = data_accept(data, ftp TSRMLS_CC)) == NULL) { goto bail; } @@ -1834,7 +1833,7 @@ ftp_nb_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) { goto bail; } - if ((data = data_accept(data, ftp)) == NULL) { + if ((data = data_accept(data, ftp TSRMLS_CC)) == NULL) { goto bail; } ftp->data = data; diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 3a75f26318..f31a6bf207 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -131,7 +131,7 @@ static PHP_RINIT_FUNCTION(pcre) /* {{{ pcre_get_compiled_regex */ -PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options) { +PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options TSRMLS_DC) { pcre *re = NULL; int coptions = 0; int soptions = 0; @@ -151,7 +151,6 @@ PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_ #endif pcre_cache_entry *pce; pcre_cache_entry new_entry; - TSRMLS_FETCH(); /* Try to lookup the cached regex entry, and if successful, just pass back the compiled pattern, otherwise go on and compile it. */ @@ -408,7 +407,7 @@ static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) } /* Compile regex or get it from cache. */ - if ((re = pcre_get_compiled_regex(Z_STRVAL_PP(regex), &extra, &preg_options)) == NULL) { + if ((re = pcre_get_compiled_regex(Z_STRVAL_PP(regex), &extra, &preg_options TSRMLS_CC)) == NULL) { RETURN_FALSE; } @@ -612,14 +611,13 @@ static int preg_get_backref(char **str, int *backref) /* {{{ preg_do_repl_func */ -static int preg_do_repl_func(zval *function, char *subject, int *offsets, int count, char **result) +static int preg_do_repl_func(zval *function, char *subject, int *offsets, int count, char **result TSRMLS_DC) { zval *retval_ptr; /* Function return value */ zval **args[1]; /* Argument to pass to function */ zval *subpats; /* Captured subpatterns */ int result_len; /* Return value length */ int i; - TSRMLS_FETCH(); MAKE_STD_ZVAL(subpats); array_init(subpats); @@ -769,7 +767,7 @@ PHPAPI char *php_pcre_replace(char *regex, int regex_len, walk_last; /* Last walked character */ /* Compile regex or get it from cache. */ - if ((re = pcre_get_compiled_regex(regex, &extra, &preg_options)) == NULL) { + if ((re = pcre_get_compiled_regex(regex, &extra, &preg_options TSRMLS_CC)) == NULL) { return NULL; } @@ -824,7 +822,7 @@ PHPAPI char *php_pcre_replace(char *regex, int regex_len, } else if (is_callable_replace) { /* Use custom function to get replacement string and its length. */ eval_result_len = preg_do_repl_func(replace_val, subject, offsets, - count, &eval_result); + count, &eval_result TSRMLS_CC); new_len += eval_result_len; } else { /* do regular substitution */ walk = replace; @@ -1174,7 +1172,7 @@ PHP_FUNCTION(preg_split) convert_to_string_ex(subject); /* Compile regex or get it from cache. */ - if ((re = pcre_get_compiled_regex(Z_STRVAL_PP(regex), &extra, &preg_options)) == NULL) { + if ((re = pcre_get_compiled_regex(Z_STRVAL_PP(regex), &extra, &preg_options TSRMLS_CC)) == NULL) { RETURN_FALSE; } @@ -1408,7 +1406,7 @@ PHP_FUNCTION(preg_grep) } /* Compile regex or get it from cache. */ - if ((re = pcre_get_compiled_regex(Z_STRVAL_PP(regex), &extra, &preg_options)) == NULL) { + if ((re = pcre_get_compiled_regex(Z_STRVAL_PP(regex), &extra, &preg_options TSRMLS_CC)) == NULL) { RETURN_FALSE; } diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h index d65f3412f2..938f612844 100644 --- a/ext/pcre/php_pcre.h +++ b/ext/pcre/php_pcre.h @@ -42,7 +42,7 @@ PHP_FUNCTION(preg_quote); PHP_FUNCTION(preg_grep); PHPAPI char *php_pcre_replace(char *regex, int regex_len, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int *result_len, int limit TSRMLS_DC); -PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *options); +PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *options TSRMLS_DC); extern zend_module_entry pcre_module_entry; #define pcre_module_ptr &pcre_module_entry diff --git a/ext/session/session.c b/ext/session/session.c index 4515dfc8cd..6a5dc71dd0 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -959,7 +959,7 @@ static void php_session_send_cookie(TSRMLS_D) struct timeval tv; gettimeofday(&tv, NULL); - date_fmt = php_std_date(tv.tv_sec + PS(cookie_lifetime)); + date_fmt = php_std_date(tv.tv_sec + PS(cookie_lifetime) TSRMLS_CC); smart_str_appends(&ncookie, COOKIE_EXPIRES); smart_str_appends(&ncookie, date_fmt); 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: diff --git a/main/output.c b/main/output.c index 00b30ed75d..21883574c0 100644 --- a/main/output.c +++ b/main/output.c @@ -683,10 +683,10 @@ static int php_ub_body_write(const char *str, uint str_length TSRMLS_DC) int result = 0; if (SG(request_info).headers_only) { - php_header(); + php_header(TSRMLS_C); zend_bailout(); } - if (php_header()) { + if (php_header(TSRMLS_C)) { if (zend_is_compiling(TSRMLS_C)) { OG(output_start_filename) = zend_get_compiled_filename(TSRMLS_C); OG(output_start_lineno) = zend_get_compiled_lineno(TSRMLS_C); diff --git a/main/php_variables.c b/main/php_variables.c index a47980371d..1c7ee890a3 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -454,7 +454,7 @@ PHPAPI int php_handle_special_queries(TSRMLS_D) if (php_info_logos(SG(request_info).query_string+1 TSRMLS_CC)) { return 1; } else if (!strcmp(SG(request_info).query_string+1, PHP_CREDITS_GUID)) { - php_print_credits(PHP_CREDITS_ALL); + php_print_credits(PHP_CREDITS_ALL TSRMLS_CC); return 1; } } diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c index 9a4e409fa8..733cfba0e5 100644 --- a/sapi/apache/php_apache.c +++ b/sapi/apache/php_apache.c @@ -321,7 +321,7 @@ PHP_FUNCTION(virtual) } php_end_ob_buffers(1 TSRMLS_CC); - php_header(); + php_header(TSRMLS_C); if (run_sub_req(rr)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - request execution failed", (*filename)->value.str.val); diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c index 665af1eec7..1664528dbe 100644 --- a/sapi/apache2handler/php_functions.c +++ b/sapi/apache2handler/php_functions.c @@ -92,7 +92,7 @@ PHP_FUNCTION(virtual) /* Flush everything. */ php_end_ob_buffers(1 TSRMLS_CC); - php_header(); + php_header(TSRMLS_C); if (ap_run_sub_req(rr)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - request execution failed", Z_STRVAL_PP(filename)); diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c index 9ac4a8bb3c..a7869c3e43 100644 --- a/sapi/apache_hooks/php_apache.c +++ b/sapi/apache_hooks/php_apache.c @@ -1732,7 +1732,7 @@ PHP_FUNCTION(virtual) } php_end_ob_buffers(1 TSRMLS_CC); - php_header(); + php_header(TSRMLS_C); if (run_sub_req(rr)) { php_error(E_WARNING, "Unable to include '%s' - request execution failed", (*filename)->value.str.val); diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 769fab13b9..5d99c2244f 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -464,7 +464,9 @@ static void sapi_cgi_register_variables(zval *track_vars_array TSRMLS_DC) static void sapi_cgi_log_message(char *message) { - if (php_header()) { + TSRMLS_FETCH(); + + if (php_header(TSRMLS_C)) { fprintf(stderr, "%s", message); fprintf(stderr, "\n"); } diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index c053aef435..1fedbe1c35 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -238,7 +238,9 @@ static void sapi_cli_register_variables(zval *track_vars_array TSRMLS_DC) static void sapi_cli_log_message(char *message) { - if (php_header()) { + TSRMLS_FETCH(); + + if (php_header(TSRMLS_C)) { fprintf(stderr, "%s", message); fprintf(stderr, "\n"); } diff --git a/sapi/servlet/servlet.c b/sapi/servlet/servlet.c index e82a4dd1b1..5d859e53a3 100644 --- a/sapi/servlet/servlet.c +++ b/sapi/servlet/servlet.c @@ -375,7 +375,7 @@ JNIEXPORT void JNICALL Java_net_php_servlet_send } } else { php_execute_script(&file_handle TSRMLS_CC); - php_header(); /* Make sure headers have been sent */ + php_header(TSRMLS_C); /* Make sure headers have been sent */ } /* |