cvs: php4 /ext/cpdf cpdf.c /ext/gd gd.c gd_ctx.c /ext/ming ming.c /ext/pdf pdf.c /ext/pgsql pgsql.c /ext/standard basic_functions.c /ext/swf
swf.c /ext/zlib zlib.c /main main.c php.h php_main.h /sapi/cgi cgi_main.c /sapi/servlet servlet.c

From: Date: Sun, 05 Aug 2001 16:21:34 +0000
Subject: cvs: php4 /ext/cpdf cpdf.c /ext/gd gd.c gd_ctx.c /ext/ming ming.c /ext/pdf pdf.c /ext/pgsql pgsql.c /ext/standard basic_functions.c /ext/swf
swf.c /ext/zlib zlib.c /main main.c php.h php_main.h /sapi/cgi cgi_main.c /sapi/servlet servlet.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6577@lists.php.net to get a copy of this message
sas Sun Aug 5 12:21:34 2001 EDT Modified files: /php4/ext/cpdf cpdf.c /php4/ext/gd gd.c gd_ctx.c /php4/ext/ming ming.c /php4/ext/pdf pdf.c /php4/ext/pgsql pgsql.c /php4/ext/standard basic_functions.c /php4/ext/swf swf.c /php4/ext/zlib zlib.c /php4/main main.c php.h php_main.h /php4/sapi/cgi cgi_main.c /php4/sapi/servlet servlet.c Log: some more eliminate-fetches-or-escalate-them-at-least

Index: php4/ext/cpdf/cpdf.c diff -u php4/ext/cpdf/cpdf.c:1.30 php4/ext/cpdf/cpdf.c:1.31 --- php4/ext/cpdf/cpdf.c:1.30 Tue Jul 31 01:43:48 2001 +++ php4/ext/cpdf/cpdf.c Sun Aug 5 12:21:28 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cpdf.c,v 1.30 2001/07/31 05:43:48 zeev Exp $ */ +/* $Id: cpdf.c,v 1.31 2001/08/05 16:21:28 sas Exp $ */ /* cpdflib.h -- C language API definitions for ClibPDF library * Copyright (C) 1998 FastIO Systems, All Rights Reserved. */ @@ -2335,7 +2335,7 @@ buffer = cpdf_getBufferForPDF(pdf, &lenght); - php_write(buffer, lenght); + php_write(buffer, lenght TSRMLS_CC); RETURN_TRUE; } Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.148 php4/ext/gd/gd.c:1.149 --- php4/ext/gd/gd.c:1.148 Sat Aug 4 21:42:35 2001 +++ php4/ext/gd/gd.c Sun Aug 5 12:21:29 2001 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.148 2001/08/05 01:42:35 zeev Exp $ */ +/* $Id: gd.c,v 1.149 2001/08/05 16:21:29 sas Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1382,7 +1382,7 @@ ap_bsetflag(php3_rqst->connection->client, B_EBCDIC2ASCII, 0); #endif while ((b = fread(buf, 1, sizeof(buf), tmp)) > 0) { - php_write(buf, b); + php_write(buf, b TSRMLS_CC); } fclose(tmp); Index: php4/ext/gd/gd_ctx.c diff -u php4/ext/gd/gd_ctx.c:1.10 php4/ext/gd/gd_ctx.c:1.11 --- php4/ext/gd/gd_ctx.c:1.10 Tue Jul 31 03:09:39 2001 +++ php4/ext/gd/gd_ctx.c Sun Aug 5 12:21:29 2001 @@ -5,12 +5,14 @@ static void _php_image_output_putc(struct gdIOCtx *ctx, int c) { - php_write(&c, 1); + TSRMLS_FETCH(); + php_write(&c, 1 TSRMLS_CC); } static int _php_image_output_putbuf(struct gdIOCtx *ctx, const void* buf, int l) { - return php_write((void *)buf, l); + TSRMLS_FETCH(); + return php_write((void *)buf, l TSRMLS_CC); } static void _php_image_output_ctxfree(struct gdIOCtx *ctx) Index: php4/ext/ming/ming.c diff -u php4/ext/ming/ming.c:1.11 php4/ext/ming/ming.c:1.12 --- php4/ext/ming/ming.c:1.11 Tue Jul 31 01:43:57 2001 +++ php4/ext/ming/ming.c Sun Aug 5 12:21:29 2001 @@ -1489,7 +1489,9 @@ void phpByteOutputMethod(byte b, void *data) { - php_write(&b, 1); + TSRMLS_FETCH(); + + php_write(&b, 1 TSRMLS_CC); } PHP_FUNCTION(swfmovie_output) Index: php4/ext/pdf/pdf.c diff -u php4/ext/pdf/pdf.c:1.92 php4/ext/pdf/pdf.c:1.93 --- php4/ext/pdf/pdf.c:1.92 Sat Aug 4 21:42:38 2001 +++ php4/ext/pdf/pdf.c Sun Aug 5 12:21:29 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdf.c,v 1.92 2001/08/05 01:42:38 zeev Exp $ */ +/* $Id: pdf.c,v 1.93 2001/08/05 16:21:29 sas Exp $ */ /* pdflib 2.02 ... 3.0x is subject to the ALADDIN FREE PUBLIC LICENSE. Copyright (C) 1997-1999 Thomas Merz. 2000-2001 PDFlib GmbH */ @@ -325,8 +325,9 @@ */ static size_t pdf_flushwrite(PDF *p, void *data, size_t size) { - return(php_write(data, size)); - return 0; + TSRMLS_FETCH(); + + return(php_write(data, size TSRMLS_CC)); } /* }}} */ @@ -346,7 +347,7 @@ #else php_info_print_table_row(2, "PDFlib GmbH Version", tmp ); #endif - php_info_print_table_row(2, "Revision", "$Revision: 1.92 $" ); + php_info_print_table_row(2, "Revision", "$Revision: 1.93 $" ); php_info_print_table_end(); } Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.123 php4/ext/pgsql/pgsql.c:1.124 --- php4/ext/pgsql/pgsql.c:1.123 Tue Jul 31 19:47:32 2001 +++ php4/ext/pgsql/pgsql.c Sun Aug 5 12:21:30 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.123 2001/07/31 23:47:32 sniper Exp $ */ +/* $Id: pgsql.c,v 1.124 2001/08/05 16:21:30 sas Exp $ */ #include <stdlib.h> @@ -174,7 +174,7 @@ TSRMLS_FETCH(); if (! PGG(ignore_notices)) { - php_log_err((char *) message); + php_log_err((char *) message TSRMLS_CC); if (PGG(last_notice) != NULL) { efree(PGG(last_notice)); } Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.377 php4/ext/standard/basic_functions.c:1.378 --- php4/ext/standard/basic_functions.c:1.377 Sat Aug 4 21:42:41 2001 +++ php4/ext/standard/basic_functions.c Sun Aug 5 12:21:30 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.377 2001/08/05 01:42:41 zeev Exp $ */ +/* $Id: basic_functions.c,v 1.378 2001/08/05 16:21:30 sas Exp $ */ #include "php.h" #include "php_main.h" @@ -1614,7 +1614,7 @@ fclose(logfile); break; default: - php_log_err(message); + php_log_err(message TSRMLS_CC); break; } return SUCCESS; Index: php4/ext/swf/swf.c diff -u php4/ext/swf/swf.c:1.37 php4/ext/swf/swf.c:1.38 --- php4/ext/swf/swf.c:1.37 Sat Aug 4 21:42:42 2001 +++ php4/ext/swf/swf.c Sun Aug 5 12:21:31 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: swf.c,v 1.37 2001/08/05 01:42:42 zeev Exp $ */ +/* $Id: swf.c,v 1.38 2001/08/05 16:21:31 sas Exp $ */ #ifdef HAVE_CONFIG_H @@ -255,7 +255,7 @@ } while ((b = fread(buf, 1, sizeof(buf), f)) > 0) - php_write(buf, b); + php_write(buf, b TSRMLS_CC); fclose(f); Index: php4/ext/zlib/zlib.c diff -u php4/ext/zlib/zlib.c:1.92 php4/ext/zlib/zlib.c:1.93 --- php4/ext/zlib/zlib.c:1.92 Sun Aug 5 11:29:39 2001 +++ php4/ext/zlib/zlib.c Sun Aug 5 12:21:31 2001 @@ -16,7 +16,7 @@ | Stefan Röhrich <sr@linux.de> | +----------------------------------------------------------------------+ */ -/* $Id: zlib.c,v 1.92 2001/08/05 15:29:39 sas Exp $ */ +/* $Id: zlib.c,v 1.93 2001/08/05 16:21:31 sas Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -67,7 +67,7 @@ #define PUTC(a) PUTS(a) #endif #ifndef PHPWRITE -#define PHPWRITE(a,n) php_write((a),(n)) +#define PHPWRITE(a,n) php_write((a),(n) TSRMLS_CC) #endif #endif Index: php4/main/main.c diff -u php4/main/main.c:1.397 php4/main/main.c:1.398 --- php4/main/main.c:1.397 Sun Aug 5 11:55:42 2001 +++ php4/main/main.c Sun Aug 5 12:21:32 2001 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.397 2001/08/05 15:55:42 sas Exp $ */ +/* $Id: main.c,v 1.398 2001/08/05 16:21:32 sas Exp $ */ /* {{{ includes */ @@ -263,13 +263,12 @@ /* {{{ php_log_err */ -PHPAPI void php_log_err(char *log_message) +PHPAPI void php_log_err(char *log_message TSRMLS_DC) { FILE *log_file; char error_time_str[128]; struct tm tmbuf; time_t error_time; - TSRMLS_FETCH(); /* Try to use the specified logging location. */ if (PG(error_log) != NULL) { @@ -304,9 +303,8 @@ /* {{{ php_write wrapper for modules to use PHPWRITE */ -PHPAPI int php_write(void *buf, uint size) +PHPAPI int php_write(void *buf, uint size TSRMLS_DC) { - TSRMLS_FETCH(); return PHPWRITE(buf, size); } /* }}} */ @@ -388,7 +386,7 @@ } #endif snprintf(log_buffer, 1024, "PHP %s: %s in %s on line %d", error_type_str, buffer, error_filename, error_lineno); - php_log_err(log_buffer); + php_log_err(log_buffer TSRMLS_CC); } if (module_initialized && PG(display_errors) && (!PG(during_request_startup) || PG(display_startup_errors))) { @@ -553,7 +551,6 @@ if (EG(error_reporting)&E_WARNING) { #if ZEND_DEBUG char memory_leak_buf[512]; - TSRMLS_FETCH(); if (message==ZMSG_MEMORY_LEAK_DETECTED) { zend_mem_header *t = (zend_mem_header *) data; @@ -931,17 +928,17 @@ */ int php_module_shutdown_wrapper(sapi_module_struct *sapi_globals) { - php_module_shutdown(); + TSRMLS_FETCH(); + php_module_shutdown(TSRMLS_C); return SUCCESS; } /* }}} */ /* {{{ php_module_shutdown */ -void php_module_shutdown() +void php_module_shutdown(TSRMLS_D) { int module_number=0; /* for UNREGISTER_INI_ENTRIES() */ - TSRMLS_FETCH(); if (!module_initialized) { return; Index: php4/main/php.h diff -u php4/main/php.h:1.147 php4/main/php.h:1.148 --- php4/main/php.h:1.147 Sun Aug 5 11:55:43 2001 +++ php4/main/php.h Sun Aug 5 12:21:32 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php.h,v 1.147 2001/08/05 15:55:43 sas Exp $ */ +/* $Id: php.h,v 1.148 2001/08/05 16:21:32 sas Exp $ */ #ifndef PHP_H #define PHP_H @@ -245,9 +245,9 @@ #endif void phperror(char *error); -PHPAPI int php_write(void *buf, uint size); +PHPAPI int php_write(void *buf, uint size TSRMLS_DC); PHPAPI int php_printf(const char *format, ...); -PHPAPI void php_log_err(char *log_message); +PHPAPI void php_log_err(char *log_message TSRMLS_DC); int Debug(char *format, ...); int cfgparse(void); Index: php4/main/php_main.h diff -u php4/main/php_main.h:1.14 php4/main/php_main.h:1.15 --- php4/main/php_main.h:1.14 Sat Jul 28 07:36:28 2001 +++ php4/main/php_main.h Sun Aug 5 12:21:33 2001 @@ -18,7 +18,7 @@ */ -/* $Id: php_main.h,v 1.14 2001/07/28 11:36:28 zeev Exp $ */ +/* $Id: php_main.h,v 1.15 2001/08/05 16:21:33 sas Exp $ */ #ifndef PHP_MAIN_H @@ -32,7 +32,7 @@ PHPAPI void php_request_shutdown(void *dummy); PHPAPI void php_request_shutdown_for_exec(void *dummy); PHPAPI int php_module_startup(sapi_module_struct *sf); -PHPAPI void php_module_shutdown(void); +PHPAPI void php_module_shutdown(TSRMLS_D); PHPAPI void php_module_shutdown_for_exec(void); PHPAPI int php_module_shutdown_wrapper(sapi_module_struct *sapi_globals); Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.130 php4/sapi/cgi/cgi_main.c:1.131 --- php4/sapi/cgi/cgi_main.c:1.130 Sun Aug 5 11:29:43 2001 +++ php4/sapi/cgi/cgi_main.c Sun Aug 5 12:21:33 2001 @@ -563,7 +563,7 @@ case 'i': /* php info & quit */ if (php_request_startup(TSRMLS_C)==FAILURE) { - php_module_shutdown(); + php_module_shutdown(TSRMLS_C); return FAILURE; } if (no_headers) { @@ -611,7 +611,7 @@ case 'v': /* show php version & quit */ no_headers = 1; if (php_request_startup(TSRMLS_C)==FAILURE) { - php_module_shutdown(); + php_module_shutdown(TSRMLS_C); return FAILURE; } if (no_headers) { @@ -668,7 +668,7 @@ } if (php_request_startup(TSRMLS_C)==FAILURE) { - php_module_shutdown(); + php_module_shutdown(TSRMLS_C); return FAILURE; } if (no_headers) { @@ -714,7 +714,7 @@ if(!argv0 || !(file_handle.handle.fp = VCWD_FOPEN(argv0, "rb"))) { PUTS("No input file specified.\n"); php_request_shutdown((void *) 0); - php_module_shutdown(); + php_module_shutdown(TSRMLS_C); return FAILURE; } file_handle.filename = argv0; @@ -782,7 +782,7 @@ exit_status = -1; } zend_end_try(); - php_module_shutdown(); + php_module_shutdown(TSRMLS_C); #ifdef ZTS tsrm_shutdown(); Index: php4/sapi/servlet/servlet.c diff -u php4/sapi/servlet/servlet.c:1.57 php4/sapi/servlet/servlet.c:1.58 --- php4/sapi/servlet/servlet.c:1.57 Sun Aug 5 11:29:46 2001 +++ php4/sapi/servlet/servlet.c Sun Aug 5 12:21:33 2001 @@ -269,7 +269,9 @@ JNIEXPORT void JNICALL Java_net_php_servlet_shutdown (JNIEnv *jenv, jobject self) { - php_module_shutdown(); + TSRMLS_FETCH(); + + php_module_shutdown(TSRMLS_C); #ifdef ZTS tsrm_shutdown(); #endif @@ -361,7 +363,7 @@ if (retval == FAILURE) { php_request_shutdown((void *) 0); - php_module_shutdown(); + php_module_shutdown(TSRMLS_C); ThrowIOException(jenv, file_handle.filename); return; }
« previous php.cvs (#6577) next »