summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2011-02-03 12:45:30 +0000
committerGustavo André dos Santos Lopes <cataphract@php.net>2011-02-03 12:45:30 +0000
commite15dd93e7e7e4e99b9e6120003968aac0ffe0c55 (patch)
tree1dead5914ec16b5e783580c184278cc6ea4818dd
parentfac1e871713d4117cfb5f108f235f60e313f99da (diff)
downloadphp-git-e15dd93e7e7e4e99b9e6120003968aac0ffe0c55.tar.gz
- Simpler fix for bug #53915.
-rw-r--r--ext/reflection/php_reflection.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index b89d53581d..e6a2109c2a 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -3731,11 +3731,6 @@ ZEND_METHOD(reflection_class, hasConstant)
}
/* }}} */
-static int _update_constant_ex_cb_wrapper(void *pDest, void *ce TSRMLS_DC)
-{
- return zval_update_constant_ex(pDest, (void*)(zend_uintptr_t)1U, ce);
-}
-
/* {{{ proto public array ReflectionClass::getConstants()
Returns an associative array containing this class' constants and their values */
ZEND_METHOD(reflection_class, getConstants)
@@ -3749,7 +3744,7 @@ ZEND_METHOD(reflection_class, getConstants)
}
GET_REFLECTION_OBJECT_PTR(ce);
array_init(return_value);
- zend_hash_apply_with_argument(&ce->constants_table, _update_constant_ex_cb_wrapper, ce TSRMLS_CC);
+ zend_hash_apply_with_argument(&ce->constants_table, (apply_func_arg_t)zval_update_constant_inline_change, ce TSRMLS_CC);
zend_hash_copy(Z_ARRVAL_P(return_value), &ce->constants_table, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
}
/* }}} */
@@ -3770,7 +3765,7 @@ ZEND_METHOD(reflection_class, getConstant)
}
GET_REFLECTION_OBJECT_PTR(ce);
- zend_hash_apply_with_argument(&ce->constants_table, _update_constant_ex_cb_wrapper, ce TSRMLS_CC);
+ zend_hash_apply_with_argument(&ce->constants_table, (apply_func_arg_t)zval_update_constant_inline_change, ce TSRMLS_CC);
if (zend_hash_find(&ce->constants_table, name, name_len + 1, (void **) &value) == FAILURE) {
RETURN_FALSE;
}