mike            Wed Aug 30 14:42:01 2006 UTC

  Modified files:              
    /php-src/main       output.c php_output.h 
  Log:
  - add PHP_OUTPUT_WRITTEN and PHP_OUTPUT_SENT status flags
  
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.193&r2=1.194&diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.193 php-src/main/output.c:1.194
--- php-src/main/output.c:1.193 Wed Aug 30 12:06:22 2006
+++ php-src/main/output.c       Wed Aug 30 14:42:01 2006
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: output.c,v 1.193 2006/08/30 12:06:22 mike Exp $ */
+/* $Id: output.c,v 1.194 2006/08/30 14:42:01 mike Exp $ */
 
 #ifndef PHP_OUTPUT_DEBUG
 #      define PHP_OUTPUT_DEBUG 0
@@ -863,6 +863,7 @@
 static inline int php_output_handler_append(php_output_handler *handler, const 
php_output_buffer *buf TSRMLS_DC)
 {
        if (buf->used) {
+               OG(flags) |= PHP_OUTPUT_WRITTEN;
                /* store it away */
                if ((handler->buffer.size - handler->buffer.used) <= buf->used) 
{
                        size_t grow_int = 
PHP_OUTPUT_HANDLER_INITBUF_SIZE(handler->size);
@@ -1069,6 +1070,7 @@
                        if (OG(flags) & PHP_OUTPUT_IMPLICITFLUSH) {
                                sapi_flush(TSRMLS_C);
                        }
+                       OG(flags) |= PHP_OUTPUT_SENT;
                }
        }
        php_output_context_dtor(&context);
http://cvs.php.net/viewvc.cgi/php-src/main/php_output.h?r1=1.62&r2=1.63&diff_format=u
Index: php-src/main/php_output.h
diff -u php-src/main/php_output.h:1.62 php-src/main/php_output.h:1.63
--- php-src/main/php_output.h:1.62      Wed Aug 30 07:39:09 2006
+++ php-src/main/php_output.h   Wed Aug 30 14:42:01 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_output.h,v 1.62 2006/08/30 07:39:09 mike Exp $ */
+/* $Id: php_output.h,v 1.63 2006/08/30 14:42:01 mike Exp $ */
 
 #ifndef PHP_OUTPUT_H
 #define PHP_OUTPUT_H
@@ -60,6 +60,8 @@
 /* real global flags */
 #define PHP_OUTPUT_IMPLICITFLUSH               0x01
 #define PHP_OUTPUT_DISABLED                            0x02
+#define PHP_OUTPUT_WRITTEN                             0x04
+#define PHP_OUTPUT_SENT                                        0x08
 /* supplementary flags for php_output_get_status() */
 #define PHP_OUTPUT_ACTIVE                              0x10
 #define PHP_OUTPUT_LOCKED                              0x20
@@ -205,7 +207,7 @@
 PHPAPI void php_output_discard_all(TSRMLS_D);
 
 PHPAPI int php_output_get_contents(zval *p TSRMLS_DC);
-PHPAPI int php_output_get_length(zval *TSRMLS_DC);
+PHPAPI int php_output_get_length(zval *p TSRMLS_DC);
 PHPAPI int php_output_get_level(TSRMLS_D);
 
 PHPAPI int php_output_start_default(TSRMLS_D);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to