diff options
author | Sascha Schumann <sas@php.net> | 2001-08-05 16:21:33 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2001-08-05 16:21:33 +0000 |
commit | b349df63645e48eade0481238e6ca3feb90f18fa (patch) | |
tree | d565c9fb1b058469cbbd2d248ea261c59ac6f5c4 /main | |
parent | 373b3e101e0394f0727e1e5855e18e15851d0919 (diff) | |
download | php-git-b349df63645e48eade0481238e6ca3feb90f18fa.tar.gz |
some more eliminate-fetches-or-escalate-them-at-least
Diffstat (limited to 'main')
-rw-r--r-- | main/main.c | 15 | ||||
-rw-r--r-- | main/php.h | 4 | ||||
-rw-r--r-- | main/php_main.h | 2 |
3 files changed, 9 insertions, 12 deletions
diff --git a/main/main.c b/main/main.c index fc11bad4b2..9562470cef 100644 --- a/main/main.c +++ b/main/main.c @@ -263,13 +263,12 @@ static int module_initialized = 0; /* {{{ 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 @@ PHPAPI void php_log_err(char *log_message) /* {{{ 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 @@ static void php_error_cb(int type, const char *error_filename, const uint error_ } #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 @@ static void php_message_handler_for_zend(long message, void *data) 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 @@ void php_module_shutdown_for_exec() */ 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; diff --git a/main/php.h b/main/php.h index d7f6c13f30..fb2f62f666 100644 --- a/main/php.h +++ b/main/php.h @@ -245,9 +245,9 @@ ssize_t pread(int, void *, size_t, off64_t); #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); diff --git a/main/php_main.h b/main/php_main.h index 304d199ff8..9595df11db 100644 --- a/main/php_main.h +++ b/main/php_main.h @@ -32,7 +32,7 @@ PHPAPI int php_request_startup(TSRMLS_D); 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); |