further tsrm cleanup

This commit is contained in:
Sascha Schumann 2001-08-05 14:27:39 +00:00
parent 0af7ad15f5
commit 2cce13fd50
6 changed files with 6 additions and 25 deletions

View 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;

View 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

View 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();

View 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 );

View 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 "

View 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;