summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index c1a7986650..e24d033da3 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -599,26 +599,26 @@ try_again:
if (Z_OBJ_HT_P(op)->get_properties) {
HashTable *obj_ht = Z_OBJ_HT_P(op)->get_properties(op);
if (obj_ht) {
- zval arr;
+ zend_array *arr;
if (!Z_OBJCE_P(op)->default_properties_count &&
obj_ht == Z_OBJ_P(op)->properties &&
!ZEND_HASH_GET_APPLY_COUNT(Z_OBJ_P(op)->properties)) {
/* fast copy */
if (EXPECTED(Z_OBJ_P(op)->handlers == &std_object_handlers)) {
- ZVAL_ARR(&arr, obj_ht);
+ arr = obj_ht;
if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(op)->properties) & IS_ARRAY_IMMUTABLE))) {
GC_REFCOUNT(Z_OBJ_P(op)->properties)++;
}
} else {
- ZVAL_ARR(&arr, zend_array_dup(obj_ht));
+ arr = zend_array_dup(obj_ht);
}
zval_dtor(op);
- ZVAL_COPY_VALUE(op, &arr);
+ ZVAL_ARR(op, arr);
} else {
- ZVAL_ARR(&arr, zend_array_dup(obj_ht));
+ arr = zend_array_dup(obj_ht);
zval_dtor(op);
- ZVAL_COPY_VALUE(op, &arr);
+ ZVAL_ARR(op, arr);
}
return;
}
@@ -2932,6 +2932,8 @@ static zend_always_inline void zend_memnstr_ex_pre(unsigned int td[], const char
td[(unsigned char)needle[i]] = i + 1;
}
} else {
+ size_t i;
+
for (i = 0; i < needle_len; i++) {
td[(unsigned char)needle[i]] = (int)needle_len - i;
}