summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-08-13 13:56:29 +0300
committerDmitry Stogov <dmitry@zend.com>2015-08-13 13:56:29 +0300
commit715d5d2855a0c6946ac99f1631a4dd9168b0cbfe (patch)
treecf5bf02178ec1946335c301c65a302311a4053ef /ext
parente5813fedf8c0b7309958d7ed471945d2dbf14998 (diff)
downloadphp-git-715d5d2855a0c6946ac99f1631a4dd9168b0cbfe.tar.gz
Get rid of implicit type casting in GC_*() macros in Zend/zend_types.h.
This prevented compilation warnings and disclosed few incorrect usages in Zend/zend_vm_def.h and ext/dom/xpath.c. Now explicit type casting may be required on call site. This may break some C extension code, but it shoulfn't be a problem to add explicit casting.
Diffstat (limited to 'ext')
-rw-r--r--ext/dom/xpath.c2
-rw-r--r--ext/intl/common/common_enum.cpp2
-rw-r--r--ext/reflection/php_reflection.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c
index 6e7d7519c7..5dff89e37f 100644
--- a/ext/dom/xpath.c
+++ b/ext/dom/xpath.c
@@ -209,7 +209,7 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs,
ALLOC_HASHTABLE(intern->node_list);
zend_hash_init(intern->node_list, 0, NULL, ZVAL_PTR_DTOR, 0);
}
- GC_REFCOUNT(&retval)++;
+ Z_ADDREF(retval);
zend_hash_next_index_insert(intern->node_list, &retval);
obj = Z_DOMOBJ_P(&retval);
nodep = dom_object_get_node(obj);
diff --git a/ext/intl/common/common_enum.cpp b/ext/intl/common/common_enum.cpp
index e76f3b830f..0531a6b933 100644
--- a/ext/intl/common/common_enum.cpp
+++ b/ext/intl/common/common_enum.cpp
@@ -183,7 +183,7 @@ static zend_object_iterator *IntlIterator_get_iterator(
return NULL;
}
- ++GC_REFCOUNT(ii->iterator);
+ ++GC_REFCOUNT(&ii->iterator->std);
return ii->iterator;
}
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 463cbd6a3a..00731c70c3 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2314,7 +2314,7 @@ ZEND_METHOD(reflection_generator, getExecutingGenerator)
REFLECTION_CHECK_VALID_GENERATOR(ex)
current = zend_generator_get_current(generator);
- ++GC_REFCOUNT(current);
+ ++GC_REFCOUNT(&current->std);
ZVAL_OBJ(return_value, (zend_object *) current);
}