]> granicus.if.org Git - php/commitdiff
further tsrm cleanup
authorSascha Schumann <sas@php.net>
Sun, 5 Aug 2001 14:27:39 +0000 (14:27 +0000)
committerSascha Schumann <sas@php.net>
Sun, 5 Aug 2001 14:27:39 +0000 (14:27 +0000)
sapi/aolserver/aolserver.c
sapi/apache2filter/sapi_apache2.c
sapi/caudium/caudium.c
sapi/fastcgi/fastcgi.c
sapi/roxen/roxen.c
sapi/tux/php_tux.c

index e7830c36e6f3658015316f2e708b09883c2a0293..7e3271be64bc6a3f26ad46ee2a1dcc6aa1cb5a57 100644 (file)
@@ -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;
index 56b033c7296bdaf13bb7924faac060ec0e51deec..15fab6a1cca8db4f26da26128e381a06cfc7a321 100644 (file)
@@ -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
index 5ef8b3125b5b5d61f783616bd03426489433d8d7..caae71b2dd0cb34049601e3f26640d0422ff32cd 100644 (file)
@@ -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();
index 6ad0bbec1808adc8bcec6a06da463e4d5b987837..0984dabe845af4e42ff57700a8ff42122fa73c0e 100644 (file)
@@ -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 );
index c670d6b6bb2c9a7d6257b43af8b876196c827786..9dd8708e8696b3ec8fbc725490a97656cb20d03d 100644 (file)
@@ -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 "
index abec46641037a262c23c4105e55962e2779443a2..70199750fdb9c0ec0eec8901a9d8968283276a91 100644 (file)
@@ -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;