com php-src: handle the stream->__exposed flag correc tly: main/php_streams.h

From: Date: Thu, 06 Oct 2016 00:15:29 +0000
Subject: com php-src: handle the stream->__exposed flag correc tly: main/php_streams.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94846@lists.php.net to get a copy of this message
Commit: 1e986c709c84cd2e67dffcdeaad52088e47b81e5 Author: Anatol Belski <ab@php.net> Thu, 6 Oct 2016 02:14:16 +0200 Parents: 269707f2f6ddc7b13e9e259c555d5f69b22f9499 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1e986c709c84cd2e67dffcdeaad52088e47b81e5 Log: handle the stream->__exposed flag correctly as it's a flag now, just set the value Changed paths: M main/php_streams.h Diff: diff --git a/main/php_streams.h b/main/php_streams.h index f08e72b..8246616 100644 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -253,11 +253,11 @@ END_EXTERN_C() #define php_stream_get_resource_id(stream) ((php_stream *)(stream))->res->handle /* use this to tell the stream that it is OK if we don't explicitly close it */ -#define php_stream_auto_cleanup(stream) { (stream)->__exposed++; } +#define php_stream_auto_cleanup(stream) { (stream)->__exposed = 1; } /* use this to assign the stream to a zval and tell the stream that is * has been exported to the engine; it will expect to be closed automatically * when the resources are auto-destructed */ -#define php_stream_to_zval(stream, zval) { ZVAL_RES(zval, (stream)->res); (stream)->__exposed++; } +#define php_stream_to_zval(stream, zval) { ZVAL_RES(zval, (stream)->res); (stream)->__exposed = 1; } #define php_stream_from_zval(xstr, pzval) do { \ if (((xstr) = (php_stream*)zend_fetch_resource2_ex((pzval), \

« previous php.cvs (#94846) next »