com php-src: Fix php_stream_get_from_zval(), so that it works under PHP7: main/php_streams .h
| From: | Kalle Sommer Nielsen | Date: | Mon, 19 Oct 2015 14:55:37 +0000 |
| Subject: | com php-src: Fix php_stream_get_from_zval(), so that it works under PHP7: main/php_streams .h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89459@lists.php.net to get a copy of this message | ||
Commit: b6cbc06d192b811517c1c503becc45367fa05755
Author: Kalle Sommer Nielsen <kalle@php.net> Mon, 19 Oct 2015 16:55:37 +0200
Parents: 620daef1e253dc841f5dcb24976e5378c296e8cd
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b6cbc06d192b811517c1c503becc45367fa05755
Log:
Fix php_stream_get_from_zval(), so that it works under PHP7
# We don't use zval** anymore, nor do any extension in PECL or core
# currently use this macro, but third party could.. See PR#1562 on Github
Bugs:
https://bugs.php.net/1562
Changed paths:
M main/php_streams.h
Diff:
diff --git a/main/php_streams.h b/main/php_streams.h
index 255b065..c37d104 100644
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -573,10 +573,10 @@ PHPAPI const char *php_stream_locate_eol(php_stream *stream, zend_string
*buf);
#define php_stream_open_wrapper_ex(path, mode, options, opened,
context) _php_stream_open_wrapper_ex((path), (mode), (options), (opened), (context) STREAMS_CC)
#define php_stream_get_from_zval(stream, zstream, mode, options, opened, context) \
- if (Z_TYPE_PP((zstream)) == IS_RESOURCE) { \
+ if (Z_TYPE_P((zstream)) == IS_RESOURCE) { \
php_stream_from_zval((stream), (zstream)); \
- } else (stream) = Z_TYPE_PP((zstream)) == IS_STRING ? \
- php_stream_open_wrapper_ex(Z_STRVAL_PP((zstream)), (mode), (options), (opened), (context)) :
NULL
+ } else (stream) = Z_TYPE_P((zstream)) == IS_STRING ? \
+ php_stream_open_wrapper_ex(Z_STRVAL_P((zstream)), (mode), (options), (opened), (context)) : NULL
/* pushes an error message onto the stack for a wrapper instance */
#ifdef ZTS