zeev            Tue Mar  6 08:28:51 2001 EDT

  Modified files:              
    /php4/ext/standard  output.c php_output.h 
  Log:
  More internal output buffering fixes
  
  
Index: php4/ext/standard/output.c
diff -u php4/ext/standard/output.c:1.45 php4/ext/standard/output.c:1.46
--- php4/ext/standard/output.c:1.45     Tue Mar  6 08:25:14 2001
+++ php4/ext/standard/output.c  Tue Mar  6 08:28:51 2001
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: output.c,v 1.45 2001/03/06 16:25:14 zeev Exp $ */
+/* $Id: output.c,v 1.46 2001/03/06 16:28:51 zeev Exp $ */
 
 #include "php.h"
 #include "ext/standard/head.h"
@@ -123,7 +123,6 @@
        int final_buffer_length=0;
        zval *alternate_buffer=NULL;
        char *to_be_destroyed_buffer;
-       char *internal_output_handler_buffer;
        int status;
        SLS_FETCH();
        OLS_FETCH();
@@ -143,8 +142,9 @@
        }
 
        if (OG(active_ob_buffer).internal_output_handler) {
-               internal_output_handler_buffer = 
OG(active_ob_buffer).internal_output_handler_buffer;
-               
OG(active_ob_buffer).internal_output_handler(OG(active_ob_buffer).buffer, 
OG(active_ob_buffer).text_length, &internal_output_handler_buffer, status);
+               final_buffer = OG(active_ob_buffer).internal_output_handler_buffer;
+               final_buffer_length = 
+OG(active_ob_buffer).internal_output_handler_buffer_size;
+               
+OG(active_ob_buffer).internal_output_handler(OG(active_ob_buffer).buffer, 
+OG(active_ob_buffer).text_length, &final_buffer, &final_buffer_length, status);
        } else if (OG(active_ob_buffer).output_handler) {
                zval **params[2];
                zval *orig_buffer;
@@ -196,8 +196,8 @@
 
        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);
+                       && (final_buffer != 
+OG(active_ob_buffer).internal_output_handler_buffer)) {
+                       efree(final_buffer);
                }
                if (OG(nesting_level)>1) { /* restore previous buffer */
                        php_ob_buffer *ob_buffer_p;
Index: php4/ext/standard/php_output.h
diff -u php4/ext/standard/php_output.h:1.22 php4/ext/standard/php_output.h:1.23
--- php4/ext/standard/php_output.h:1.22 Tue Mar  6 08:25:14 2001
+++ php4/ext/standard/php_output.h      Tue Mar  6 08:28:51 2001
@@ -16,14 +16,14 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_output.h,v 1.22 2001/03/06 16:25:14 zeev Exp $ */
+/* $Id: php_output.h,v 1.23 2001/03/06 16:28:51 zeev Exp $ */
 
 #ifndef PHP_OUTPUT_H
 #define PHP_OUTPUT_H
 
 #include "php.h"
 
-typedef void (*php_output_handler_func_t)(char *output, uint output_len, char 
**handled_output, int mode);
+typedef void (*php_output_handler_func_t)(char *output, uint output_len, char 
+**handled_output, uint *handled_output_len, int mode);
 
 PHPAPI void php_output_startup(void);
 void php_output_register_constants(void);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to