From: Andi Gutmans Date: Wed, 23 May 2001 16:52:45 +0000 (+0000) Subject: - Fix problem of output initialization X-Git-Tag: PRE_GRANULAR_GARBAGE_FIX~264 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ddb24366f5d3a32e7c021e0c0b99d6d413e7e5a;p=php - Fix problem of output initialization --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index b8ed7cdcaf..c43bfdaa01 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -751,7 +751,6 @@ PHP_MINIT_FUNCTION(basic) register_html_constants(INIT_FUNC_ARGS_PASSTHRU); register_string_constants(INIT_FUNC_ARGS_PASSTHRU); - PHP_MINIT(output)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(regex)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(file)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(pack)(INIT_FUNC_ARGS_PASSTHRU); diff --git a/ext/standard/output.c b/ext/standard/output.c index 701c20d5f4..0409a1c261 100644 --- a/ext/standard/output.c +++ b/ext/standard/output.c @@ -59,7 +59,8 @@ static void php_output_init_globals(OLS_D) } -PHP_MINIT_FUNCTION(output) +/* Start output layer */ +PHPAPI void php_output_startup() { #ifdef ZTS output_globals_id = ts_allocate_id(sizeof(php_output_globals), (ts_allocate_ctor) php_output_init_globals, NULL); @@ -67,18 +68,14 @@ PHP_MINIT_FUNCTION(output) php_output_init_globals(OLS_C); #endif - return SUCCESS; -} + { + OLS_FETCH(); -/* Start output layer */ -PHPAPI void php_output_startup() -{ - OLS_FETCH(); - - OG(php_body_write) = php_ub_body_write; - OG(php_header_write) = sapi_module.ub_write; - OG(nesting_level) = 0; - OG(lock) = 0; + OG(php_body_write) = php_ub_body_write; + OG(php_header_write) = sapi_module.ub_write; + OG(nesting_level) = 0; + OG(lock) = 0; + } } diff --git a/ext/standard/php_output.h b/ext/standard/php_output.h index ab9f799905..58a3db8c15 100644 --- a/ext/standard/php_output.h +++ b/ext/standard/php_output.h @@ -47,8 +47,6 @@ PHP_FUNCTION(ob_get_contents); PHP_FUNCTION(ob_get_length); PHP_FUNCTION(ob_implicit_flush); -PHP_MINIT_FUNCTION(output); - typedef struct _php_ob_buffer { char *buffer; uint size; diff --git a/main/output.c b/main/output.c index 701c20d5f4..0409a1c261 100644 --- a/main/output.c +++ b/main/output.c @@ -59,7 +59,8 @@ static void php_output_init_globals(OLS_D) } -PHP_MINIT_FUNCTION(output) +/* Start output layer */ +PHPAPI void php_output_startup() { #ifdef ZTS output_globals_id = ts_allocate_id(sizeof(php_output_globals), (ts_allocate_ctor) php_output_init_globals, NULL); @@ -67,18 +68,14 @@ PHP_MINIT_FUNCTION(output) php_output_init_globals(OLS_C); #endif - return SUCCESS; -} + { + OLS_FETCH(); -/* Start output layer */ -PHPAPI void php_output_startup() -{ - OLS_FETCH(); - - OG(php_body_write) = php_ub_body_write; - OG(php_header_write) = sapi_module.ub_write; - OG(nesting_level) = 0; - OG(lock) = 0; + OG(php_body_write) = php_ub_body_write; + OG(php_header_write) = sapi_module.ub_write; + OG(nesting_level) = 0; + OG(lock) = 0; + } } diff --git a/main/php_output.h b/main/php_output.h index ab9f799905..58a3db8c15 100644 --- a/main/php_output.h +++ b/main/php_output.h @@ -47,8 +47,6 @@ PHP_FUNCTION(ob_get_contents); PHP_FUNCTION(ob_get_length); PHP_FUNCTION(ob_implicit_flush); -PHP_MINIT_FUNCTION(output); - typedef struct _php_ob_buffer { char *buffer; uint size;