lbarnaud                Sat May 16 20:27:11 2009 UTC

  Modified files:              
    /php-src/main/streams       memory.c 
  Log:
  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.39&r2=1.40&diff_format=u
Index: php-src/main/streams/memory.c
diff -u php-src/main/streams/memory.c:1.39 php-src/main/streams/memory.c:1.40
--- php-src/main/streams/memory.c:1.39  Tue Mar 10 23:40:01 2009
+++ php-src/main/streams/memory.c       Sat May 16 20:27:11 2009
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: memory.c,v 1.39 2009/03/10 23:40:01 helly Exp $ */
+/* $Id: memory.c,v 1.40 2009/05/16 20:27:11 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