diff options
author | Joe Watkins <krakjoe@php.net> | 2016-09-30 07:22:50 +0100 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2016-09-30 07:22:50 +0100 |
commit | e60620b97418041c56a94f4f1eb20355b91999c5 (patch) | |
tree | 602447fe15d336e696a2de440ac6469bfde1114f | |
parent | a8d031fbd87d2ea5d52de30f1764bf48b9b76c05 (diff) | |
parent | 81cbbb68af0feb284ce098c8cf96dc5a857b5239 (diff) | |
download | php-git-e60620b97418041c56a94f4f1eb20355b91999c5.tar.gz |
Merge branch 'PHP-7.0' of https://github.com/php/php-src into PHP-7.0
-rw-r--r-- | Zend/zend_execute.c | 14 | ||||
-rw-r--r-- | ext/curl/interface.c | 3 | ||||
-rw-r--r-- | win32/build/Makefile | 3 | ||||
-rw-r--r-- | win32/build/confutils.js | 3 |
4 files changed, 20 insertions, 3 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 2882f3dc33..326c719c65 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -576,7 +576,6 @@ static inline zval *_get_obj_zval_ptr_ptr(int op_type, znode_op node, zend_execu static inline void zend_assign_to_variable_reference(zval *variable_ptr, zval *value_ptr) { zend_reference *ref; - zval garbage; if (EXPECTED(!Z_ISREF_P(value_ptr))) { ZVAL_NEW_REF(value_ptr, value_ptr); @@ -586,9 +585,18 @@ static inline void zend_assign_to_variable_reference(zval *variable_ptr, zval *v ref = Z_REF_P(value_ptr); GC_REFCOUNT(ref)++; - ZVAL_COPY_VALUE(&garbage, variable_ptr); + if (Z_REFCOUNTED_P(variable_ptr)) { + zend_refcounted *garbage = Z_COUNTED_P(variable_ptr); + + if (--GC_REFCOUNT(garbage) == 0) { + ZVAL_REF(variable_ptr, ref); + zval_dtor_func_for_ptr(garbage); + return; + } else { + GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr); + } + } ZVAL_REF(variable_ptr, ref); - zval_ptr_dtor(&garbage); } /* this should modify object only if it's empty */ diff --git a/ext/curl/interface.c b/ext/curl/interface.c index e43ca31a90..65539d1acc 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -801,6 +801,9 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND); REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_SETFAILED); REGISTER_CURL_CONSTANT(CURLE_SSL_PEER_CERTIFICATE); +#if LIBCURL_VERSION_NUM >= 0x072700 /* Available since 7.39.0 */ + REGISTER_CURL_CONSTANT(CURLE_SSL_PINNEDPUBKEYNOTMATCH); +#endif REGISTER_CURL_CONSTANT(CURLE_TELNET_OPTION_SYNTAX); REGISTER_CURL_CONSTANT(CURLE_TOO_MANY_REDIRECTS); REGISTER_CURL_CONSTANT(CURLE_UNKNOWN_TELNET_OPTION); diff --git a/win32/build/Makefile b/win32/build/Makefile index 245643b160..33f145f269 100644 --- a/win32/build/Makefile +++ b/win32/build/Makefile @@ -54,6 +54,9 @@ Zend\zend_ini_parser.c Zend\zend_ini_parser.h: Zend\zend_ini_parser.y Zend\zend_language_parser.c Zend\zend_language_parser.h: Zend\zend_language_parser.y $(BISON) --output=Zend/zend_language_parser.c -v -d -p zend Zend/zend_language_parser.y + @if "$(SED)" neq "" $(SED) -i "s,^int zendparse\(.*\),ZEND_API int zendparse\1,g" Zend/zend_language_parser.c + @if "$(SED)" neq "" $(SED) -i "s,^int zendparse\(.*\),ZEND_API int zendparse\1,g" Zend/zend_language_parser.h + @if "$(SED)" neq "" $(SED) -i "s,^#ifndef YYTOKENTYPE,#include \"zend.h\"\n#ifndef YYTOKENTYPE,g" Zend/zend_language_parser.h sapi\phpdbg\phpdbg_parser.c sapi\phpdbg\phpdbg_parser.h: sapi\phpdbg\phpdbg_parser.y $(BISON) --output=sapi/phpdbg/phpdbg_parser.c -v -d -p phpdbg_ sapi/phpdbg/phpdbg_parser.y diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 8ab4b7b0e9..e4270f705a 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -2498,6 +2498,9 @@ function toolset_setup_project_tools() ERROR('bison is required') } + /* TODO throw error, ignore for now for BC. */ + PATH_PROG('sed'); + RE2C = PATH_PROG('re2c'); if (RE2C) { var intvers, intmin; |