com php-src: Fix build + warning, decls first: ext/opcache/Opti mizer/zend_func_info.c ext/opcache/Optimizer/zend_inf erence.h
| From: | Kalle Sommer Nielsen | Date: | Sat, 15 Oct 2016 23:01:09 +0000 |
| Subject: | com php-src: Fix build + warning, decls first: ext/opcache/Opti mizer/zend_func_info.c ext/opcache/Optimizer/zend_inf erence.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95110@lists.php.net to get a copy of this message | ||
Commit: 796dd639cbef02699703714ff8af3c546ac1ba84
Author: Kalle Sommer Nielsen <kalle@php.net> Sun, 16 Oct 2016 01:01:09 +0200
Parents: 7cb1be2ecd8bbf0ca23c9d23094d847efd308eb5
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=796dd639cbef02699703714ff8af3c546ac1ba84
Log:
Fix build + warning, decls first
Changed paths:
M ext/opcache/Optimizer/zend_func_info.c
M ext/opcache/Optimizer/zend_inference.h
Diff:
diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c
index d9e3d5e..480b1c5 100644
--- a/ext/opcache/Optimizer/zend_func_info.c
+++ b/ext/opcache/Optimizer/zend_func_info.c
@@ -37,6 +37,9 @@ typedef struct _func_info_t {
info_func_t info_func;
} func_info_t;
+/* MSVC defines its own IN macro, undefine it here */
+#undef IN
+
#define F0(name, info) \
{name, sizeof(name)-1, (FUNC_MAY_WARN | (info)), NULL}
#define F1(name, info) \
diff --git a/ext/opcache/Optimizer/zend_inference.h b/ext/opcache/Optimizer/zend_inference.h
index 4febc99..bd15cae 100644
--- a/ext/opcache/Optimizer/zend_inference.h
+++ b/ext/opcache/Optimizer/zend_inference.h
@@ -163,14 +163,15 @@ static zend_always_inline uint32_t _const_op_type(const zval *zv) {
} else if (Z_TYPE_P(zv) == IS_ARRAY) {
HashTable *ht = Z_ARRVAL_P(zv);
uint32_t tmp = MAY_BE_ARRAY;
+ zend_string *str;
+ zval *val;
if (Z_REFCOUNTED_P(zv)) {
tmp |= MAY_BE_RC1 | MAY_BE_RCN;
} else {
tmp |= MAY_BE_RCN;
}
- zend_string *str;
- zval *val;
+
ZEND_HASH_FOREACH_STR_KEY_VAL(ht, str, val) {
if (str) {
tmp |= MAY_BE_ARRAY_KEY_STRING;