Wouldn't it have been easier to make that flag reverse.
ie. PHP_STREAM_FLAG_FCLOSE_NOT_ALLOWED ? And apply it to those that really should not be closeable by fclose().. :)

--Jani


Antony Dovgal wrote:
tony2001                Wed Jul 23 09:09:10 2008 UTC

  Modified files:              (Branch: PHP_5_3)
/php-src/ext/zip zip_stream.c Log:
  MFH: add PHP_STREAM_FLAG_FCLOSE to zip streams
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/zip_stream.c?r1=1.1.2.5&r2=1.1.2.5.2.1&diff_format=u
Index: php-src/ext/zip/zip_stream.c
diff -u php-src/ext/zip/zip_stream.c:1.1.2.5 
php-src/ext/zip/zip_stream.c:1.1.2.5.2.1
--- php-src/ext/zip/zip_stream.c:1.1.2.5        Wed Mar 14 11:08:57 2007
+++ php-src/ext/zip/zip_stream.c        Wed Jul 23 09:09:10 2008
@@ -1,4 +1,4 @@
-/* $Id: zip_stream.c,v 1.1.2.5 2007/03/14 11:08:57 pajoye Exp $ */
+/* $Id: zip_stream.c,v 1.1.2.5.2.1 2008/07/23 09:09:10 tony2001 Exp $ */
 #ifdef HAVE_CONFIG_H
 #   include "config.h"
 #endif
@@ -140,6 +140,7 @@
        if (!stream) {
                return NULL;
        } else {
+               stream->flags |= PHP_STREAM_FLAG_FCLOSE;
                return stream;
        }




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

Reply via email to