]> granicus.if.org Git - php/commitdiff
Fix build + warning, decls first
authorKalle Sommer Nielsen <kalle@php.net>
Sat, 15 Oct 2016 23:01:09 +0000 (01:01 +0200)
committerKalle Sommer Nielsen <kalle@php.net>
Sat, 15 Oct 2016 23:01:09 +0000 (01:01 +0200)
ext/opcache/Optimizer/zend_func_info.c
ext/opcache/Optimizer/zend_inference.h

index d9e3d5ee4ffcc052b72369c806751211d71d57f5..480b1c5c18752ed3ef56b5195bd2529bd69af717 100644 (file)
@@ -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) \
index 4febc99cea30ec7391cbe531c883d244ff7e2e58..bd15cae3ebb916d7bb8d89dca54758cb09feedab 100644 (file)
@@ -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;