summaryrefslogtreecommitdiff
path: root/main/php_streams.h
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-10-06 02:14:16 +0200
committerAnatol Belski <ab@php.net>2016-10-06 02:15:29 +0200
commit1e986c709c84cd2e67dffcdeaad52088e47b81e5 (patch)
tree108fd34f7cda1f2c5d3bbdd851889b0d69f14a04 /main/php_streams.h
parent269707f2f6ddc7b13e9e259c555d5f69b22f9499 (diff)
downloadphp-git-1e986c709c84cd2e67dffcdeaad52088e47b81e5.tar.gz
handle the stream->__exposed flag correctly
as it's a flag now, just set the value
Diffstat (limited to 'main/php_streams.h')
-rw-r--r--main/php_streams.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/php_streams.h b/main/php_streams.h
index f08e72b69b..82466163a2 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), \