]> granicus.if.org Git - php/commitdiff
C89 compat
authorAnatol Belski <ab@php.net>
Tue, 13 May 2014 12:04:53 +0000 (14:04 +0200)
committerAnatol Belski <ab@php.net>
Tue, 13 May 2014 12:04:53 +0000 (14:04 +0200)
Zend/zend_gc.c
Zend/zend_interfaces.c
Zend/zend_operators.c
Zend/zend_types.h

index 7712ee41ed5db743a7d43af9e4946ae30b990242..eea4de8653ccb456980cdba3839ce44c5b78fa30 100644 (file)
@@ -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++) {
index c6cebd2ed5f973a0d4d00454a646db2000256922..ded81e291894604e7ee90d4cccf12425dbec5175 100644 (file)
@@ -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))) {
index 4c9db85262100266f0e216639c7dd8a373627fe1..9e68df083dd0a98c14f6846529de79de67fcb0c8 100644 (file)
@@ -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);
index 343c67061b31f3b07561302a0c77b34f408cde88..82a168fe073a9ff9fd0bc4000768c55793da6d6a 100644 (file)
@@ -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)