From: Sascha Schumann Date: Sun, 5 Aug 2001 14:27:39 +0000 (+0000) Subject: further tsrm cleanup X-Git-Tag: PRE_ENGINE2_SPLIT~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2cce13fd50411ff524e34c3cc27f9a2087cec115;p=php further tsrm cleanup --- diff --git a/sapi/aolserver/aolserver.c b/sapi/aolserver/aolserver.c index e7830c36e6..7e3271be64 100644 --- a/sapi/aolserver/aolserver.c +++ b/sapi/aolserver/aolserver.c @@ -311,7 +311,6 @@ php_ns_sapi_register_variables(zval *track_vars_array TSRMLS_DC) int i; char buf[NS_BUF_SIZE + 1]; char *tmp; - TSRMLS_FETCH(); for(i = 0; i < Ns_SetSize(NSG(conn->headers)); i++) { char *key = Ns_SetKey(NSG(conn->headers), i); @@ -412,8 +411,6 @@ static int php_ns_module_main(TSRMLS_D) { zend_file_handle file_handle; - TSRMLS_FETCH(); - TSRMLS_FETCH(); file_handle.type = ZEND_HANDLE_FILENAME; file_handle.filename = SG(request_info).path_translated; diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 56b033c729..15fab6a1cc 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -265,7 +265,6 @@ static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC) { char *content_type; const char *auth; - TSRMLS_FETCH(); PG(during_request_startup) = 0; SG(sapi_headers).http_response_code = 200; @@ -337,7 +336,6 @@ static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb) if (ctx->state == 1 && APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(ctx->bb))) { zend_file_handle zfd; apr_bucket *eos; - TSRMLS_FETCH(); /* We want to execute only one script per request. * A bug in Apache or other filters could cause us diff --git a/sapi/caudium/caudium.c b/sapi/caudium/caudium.c index 5ef8b3125b..caae71b2dd 100644 --- a/sapi/caudium/caudium.c +++ b/sapi/caudium/caudium.c @@ -356,7 +356,6 @@ php_caudium_sapi_header_handler(sapi_header_struct *sapi_header, INLINE static int php_caudium_low_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) { - TSRMLS_FETCH(); struct pike_string *ind; struct svalue *s_headermap; GET_THIS(); diff --git a/sapi/fastcgi/fastcgi.c b/sapi/fastcgi/fastcgi.c index 6ad0bbec18..0984dabe84 100644 --- a/sapi/fastcgi/fastcgi.c +++ b/sapi/fastcgi/fastcgi.c @@ -122,7 +122,6 @@ static int sapi_fastcgi_read_post(char *buffer, uint count_bytes TSRMLS_DC) size_t read_bytes = 0, tmp; int c; char *pos = buffer; - TSRMLS_FETCH(); while( count_bytes ) { c = FCGX_GetStr( pos, count_bytes, in ); diff --git a/sapi/roxen/roxen.c b/sapi/roxen/roxen.c index c670d6b6bb..9dd8708e86 100644 --- a/sapi/roxen/roxen.c +++ b/sapi/roxen/roxen.c @@ -214,12 +214,11 @@ static int php_roxen_low_ub_write(const char *str, uint str_length) { int sent_bytes = 0; struct pike_string *to_write = NULL; -#ifdef ZTS - TSRMLS_FETCH(); -#endif #ifdef ROXEN_USE_ZTS GET_THIS(); #endif + TSRMLS_FETCH(); + if(!MY_FD_OBJ->prog) { PG(connection_status) = PHP_CONNECTION_ABORTED; zend_bailout(); @@ -246,12 +245,11 @@ php_roxen_low_ub_write(const char *str, uint str_length) { static int php_roxen_sapi_ub_write(const char *str, uint str_length) { -#ifdef ZTS - TSRMLS_FETCH(); -#endif #ifdef ROXEN_USE_ZTS GET_THIS(); #endif + TSRMLS_FETCH(); + int sent_bytes = 0, fd = MY_FD; if(fd) { @@ -352,14 +350,12 @@ php_roxen_sapi_header_handler(sapi_header_struct *sapi_header, static int php_roxen_low_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) { -#ifdef ZTS - TSRMLS_FETCH(); -#endif struct pike_string *ind; struct svalue *s_headermap; #ifdef ROXEN_USE_ZTS GET_THIS(); #endif + if(!MY_FD_OBJ->prog) { PG(connection_status) = PHP_CONNECTION_ABORTED; zend_bailout(); @@ -399,9 +395,7 @@ INLINE static int php_roxen_low_read_post(char *buf, uint count_bytes) #ifdef ROXEN_USE_ZTS GET_THIS(); #endif -#ifdef ZTS TSRMLS_FETCH(); -#endif if(!MY_FD_OBJ->prog) { @@ -583,11 +577,8 @@ static int php_roxen_module_main(TSRMLS_D) int res, len; char *dir; zend_file_handle file_handle; -#ifdef ZTS - TSRMLS_FETCH(); #ifdef ROXEN_USE_ZTS GET_THIS(); -#endif #endif file_handle.type = ZEND_HANDLE_FILENAME; @@ -621,10 +612,10 @@ void f_php_roxen_request_handler(INT32 args) struct svalue *done_callback, *raw_fd; struct pike_string *script, *ind; int status = 1; - TSRMLS_FETCH(); #ifdef ROXEN_USE_ZTS GET_THIS(); #endif + TSRMLS_FETCH(); if(current_thread == th_self()) error("PHP4.Interpreter->run: Tried to run a PHP-script from a PHP " diff --git a/sapi/tux/php_tux.c b/sapi/tux/php_tux.c index abec466410..70199750fd 100644 --- a/sapi/tux/php_tux.c +++ b/sapi/tux/php_tux.c @@ -182,7 +182,6 @@ static void sapi_tux_register_variables(zval *track_vars_array TSRMLS_DC) { char buf[BUF_SIZE + 1]; char *p; - TSRMLS_FETCH(); sprintf(buf, "Server: %s", TUXAPI_version); @@ -276,8 +275,6 @@ static sapi_module_struct tux_sapi_module = { static void tux_module_main(TSRMLS_D) { zend_file_handle file_handle; - TSRMLS_FETCH()FETCH(); - TSRMLS_FETCH()FETCH(); file_handle.type = ZEND_HANDLE_FILENAME; file_handle.filename = SG(request_info).path_translated;