summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sapi/aolserver/aolserver.c3
-rw-r--r--sapi/apache2filter/sapi_apache2.c2
-rw-r--r--sapi/caudium/caudium.c1
-rw-r--r--sapi/fastcgi/fastcgi.c1
-rw-r--r--sapi/roxen/roxen.c21
-rw-r--r--sapi/tux/php_tux.c3
6 files changed, 6 insertions, 25 deletions
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,12 +577,9 @@ 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;
file_handle.filename = THIS->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;