diff options
author | Zeev Suraski <zeev@php.net> | 2001-03-06 16:25:14 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2001-03-06 16:25:14 +0000 |
commit | 20d2432c867730adc7c0b199fb971359defb1a53 (patch) | |
tree | 99e3a0b0b22cec168913a282106c78663d766dd3 | |
parent | 13a97fefeb0ca24813e6646a943cf1f52849c257 (diff) | |
download | php-git-20d2432c867730adc7c0b199fb971359defb1a53.tar.gz |
Fix internal output buffering
-rw-r--r-- | ext/standard/output.c | 8 | ||||
-rw-r--r-- | ext/standard/php_output.h | 2 | ||||
-rw-r--r-- | main/output.c | 8 | ||||
-rw-r--r-- | main/php_output.h | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/ext/standard/output.c b/ext/standard/output.c index 02c8575617..6055439725 100644 --- a/ext/standard/output.c +++ b/ext/standard/output.c @@ -195,6 +195,10 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush) to_be_destroyed_buffer = OG(active_ob_buffer).buffer; if (!just_flush) { + if (OG(active_ob_buffer).internal_output_handler + && (internal_output_handler_buffer != OG(active_ob_buffer).internal_output_handler_buffer)) { + efree(internal_output_handler_buffer); + } if (OG(nesting_level)>1) { /* restore previous buffer */ php_ob_buffer *ob_buffer_p; @@ -224,10 +228,6 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush) OG(active_ob_buffer).status |= PHP_OUTPUT_HANDLER_START; OG(php_body_write) = php_b_body_write; } - if (OG(active_ob_buffer).internal_output_handler - && (internal_output_handler_buffer != OG(active_ob_buffer).internal_output_handler_buffer)) { - efree(internal_output_handler_buffer); - } } diff --git a/ext/standard/php_output.h b/ext/standard/php_output.h index 0cb8647690..3bfd5d078c 100644 --- a/ext/standard/php_output.h +++ b/ext/standard/php_output.h @@ -23,7 +23,7 @@ #include "php.h" -typedef void (*php_output_handler_func_t)(char *output, uint output_len, char **handled_output, int status); +typedef void (*php_output_handler_func_t)(char *output, uint output_len, char **handled_output, int mode); PHPAPI void php_output_startup(void); void php_output_register_constants(void); diff --git a/main/output.c b/main/output.c index 02c8575617..6055439725 100644 --- a/main/output.c +++ b/main/output.c @@ -195,6 +195,10 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush) to_be_destroyed_buffer = OG(active_ob_buffer).buffer; if (!just_flush) { + if (OG(active_ob_buffer).internal_output_handler + && (internal_output_handler_buffer != OG(active_ob_buffer).internal_output_handler_buffer)) { + efree(internal_output_handler_buffer); + } if (OG(nesting_level)>1) { /* restore previous buffer */ php_ob_buffer *ob_buffer_p; @@ -224,10 +228,6 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush) OG(active_ob_buffer).status |= PHP_OUTPUT_HANDLER_START; OG(php_body_write) = php_b_body_write; } - if (OG(active_ob_buffer).internal_output_handler - && (internal_output_handler_buffer != OG(active_ob_buffer).internal_output_handler_buffer)) { - efree(internal_output_handler_buffer); - } } diff --git a/main/php_output.h b/main/php_output.h index 0cb8647690..3bfd5d078c 100644 --- a/main/php_output.h +++ b/main/php_output.h @@ -23,7 +23,7 @@ #include "php.h" -typedef void (*php_output_handler_func_t)(char *output, uint output_len, char **handled_output, int status); +typedef void (*php_output_handler_func_t)(char *output, uint output_len, char **handled_output, int mode); PHPAPI void php_output_startup(void); void php_output_register_constants(void); |