summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2014-05-25 19:56:51 +0800
committerXinchen Hui <laruence@php.net>2014-05-25 19:56:51 +0800
commit0175d994c0f22a22c20d6b6ae04cd92355277d91 (patch)
tree2cb51949c84f3cf69ce1a3410c3bd34f6da97806 /Zend/zend_execute_API.c
parentc2082ece52bcb5343ae0feb460807596cd79d691 (diff)
downloadphp-git-0175d994c0f22a22c20d6b6ae04cd92355277d91.tar.gz
Fixed apply_func_arg_t, and it's better not using cast (compiler friendly)
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index a891f97e08..2b62f2e844 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -1541,9 +1541,10 @@ typedef struct _zend_abstract_info {
int ctor;
} zend_abstract_info;
-static int zend_verify_abstract_class_function(zval *zv, zend_abstract_info *ai TSRMLS_DC) /* {{{ */
+static int zend_verify_abstract_class_function(zval *zv, void *arg TSRMLS_DC) /* {{{ */
{
- zend_function *fn = Z_PTR_P(zv);
+ zend_function *fn = (zend_function *)Z_PTR_P(zv);
+ zend_abstract_info *ai = (zend_abstract_info *)arg;
if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
if (ai->cnt < MAX_ABSTRACT_INFO_CNT) {
@@ -1571,7 +1572,7 @@ void zend_verify_abstract_class(zend_class_entry *ce TSRMLS_DC) /* {{{ */
if ((ce->ce_flags & ZEND_ACC_IMPLICIT_ABSTRACT_CLASS) && !(ce->ce_flags & ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
memset(&ai, 0, sizeof(ai));
- zend_hash_apply_with_argument(&ce->function_table, (apply_func_arg_t) zend_verify_abstract_class_function, &ai TSRMLS_CC);
+ zend_hash_apply_with_argument(&ce->function_table, zend_verify_abstract_class_function, &ai TSRMLS_CC);
if (ai.cnt) {
zend_error(E_ERROR, "Class %s contains %d abstract method%s and must therefore be declared abstract or implement the remaining methods (" MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT ")",