lbarnaud                Sat May 16 20:28:02 2009 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/main/streams       memory.c 
  Log:
  MFH: Fix warning when inner stream of a temp:// stream is closed before 
  the stream ifself
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/memory.c?r1=1.8.2.6.2.20&r2=1.8.2.6.2.21&diff_format=u
Index: php-src/main/streams/memory.c
diff -u php-src/main/streams/memory.c:1.8.2.6.2.20 
php-src/main/streams/memory.c:1.8.2.6.2.21
--- php-src/main/streams/memory.c:1.8.2.6.2.20  Wed Dec 31 11:17:48 2008
+++ php-src/main/streams/memory.c       Sat May 16 20:28:02 2009
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: memory.c,v 1.8.2.6.2.20 2008/12/31 11:17:48 sebastian Exp $ */
+/* $Id: memory.c,v 1.8.2.6.2.21 2009/05/16 20:28:02 lbarnaud Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -563,6 +563,7 @@
        stream = php_stream_alloc_rel(&php_stream_temp_ops, self, 0, mode & 
TEMP_STREAM_READONLY ? "rb" : "w+b");
        stream->flags |= PHP_STREAM_FLAG_NO_BUFFER;
        self->innerstream = php_stream_memory_create_rel(mode);
+       php_stream_auto_cleanup(self->innerstream); // do not warn if 
innerstream is GC'ed before stream
        ((php_stream_memory_data*)self->innerstream->abstract)->owner_ptr = 
&self->innerstream;
 
        return stream;



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

Reply via email to