summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_gc.c3
-rw-r--r--Zend/zend_interfaces.c3
-rw-r--r--Zend/zend_operators.c2
-rw-r--r--Zend/zend_types.h6
4 files changed, 9 insertions, 5 deletions
diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c
index 7712ee41ed..eea4de8653 100644
--- a/Zend/zend_gc.c
+++ b/Zend/zend_gc.c
@@ -307,9 +307,10 @@ tail_call:
int i, n;
zval *table;
zval tmp;
+ HashTable *props;
ZVAL_OBJ(&tmp, obj);
- HashTable *props = get_gc(&tmp, &table, &n TSRMLS_CC);
+ props = get_gc(&tmp, &table, &n TSRMLS_CC);
while (n > 0 && !Z_REFCOUNTED(table[n-1])) n--;
for (i = 0; i < n; i++) {
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index c6cebd2ed5..ded81e2918 100644
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -278,9 +278,10 @@ ZEND_API zend_object_iterator *zend_user_it_get_new_iterator(zend_class_entry *c
{
zval iterator;
zend_object_iterator *new_iterator;
+ zend_class_entry *ce_it;
zend_user_it_new_iterator(ce, object, &iterator TSRMLS_CC);
- zend_class_entry *ce_it = (Z_TYPE(iterator) == IS_OBJECT &&
+ ce_it = (Z_TYPE(iterator) == IS_OBJECT &&
Z_OBJ_HT(iterator)->get_class_entry) ? Z_OBJCE(iterator) : NULL;
if (!ce_it || !ce_it->get_iterator || (ce_it->get_iterator == zend_user_it_get_new_iterator && Z_OBJ(iterator) == Z_OBJ_P(object))) {
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 4c9db85262..9e68df083d 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -2522,8 +2522,8 @@ ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2 TSRMLS_DC) /
ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC) /* {{{ */
{
- TSRMLS_FETCH();
zend_string *str;
+ TSRMLS_FETCH();
str = zend_strpprintf(0, "%.*G", (int) EG(precision), (double)Z_DVAL_P(op));
ZVAL_NEW_STR(op, str);
diff --git a/Zend/zend_types.h b/Zend/zend_types.h
index 343c67061b..82a168fe07 100644
--- a/Zend/zend_types.h
+++ b/Zend/zend_types.h
@@ -551,24 +551,26 @@ static inline zend_uchar zval_get_type(const zval* pz) {
#define ZVAL_NEW_RES(z, h, p, t) do { \
zend_resource *_res = emalloc(sizeof(zend_resource)); \
+ zval *__z; \
GC_REFCOUNT(_res) = 1; \
GC_TYPE_INFO(_res) = IS_RESOURCE; \
_res->handle = (h); \
_res->type = (t); \
_res->ptr = (p); \
- zval *__z = (z); \
+ __z = (z); \
Z_RES_P(__z) = _res; \
Z_TYPE_INFO_P(__z) = IS_RESOURCE_EX; \
} while (0)
#define ZVAL_NEW_PERSISTENT_RES(z, h, p, t) do { \
zend_resource *_res = malloc(sizeof(zend_resource)); \
+ zval *__z; \
GC_REFCOUNT(_res) = 1; \
GC_TYPE_INFO(_res) = IS_RESOURCE; \
_res->handle = (h); \
_res->type = (t); \
_res->ptr = (p); \
- zval *__z = (z); \
+ __z = (z); \
Z_RES_P(__z) = _res; \
Z_TYPE_INFO_P(__z) = IS_RESOURCE_EX; \
} while (0)