summaryrefslogtreecommitdiff
path: root/Zend/zend_closures.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2014-12-14 18:39:14 +0000
committerJakub Zelenka <bukka@php.net>2014-12-14 18:39:14 +0000
commitb9ad0002f5fc40f5808f85119a67012c2e9a4141 (patch)
tree5dc09ca330b2358670215ff9cdbf6f3bfdcbd6e4 /Zend/zend_closures.c
parent0bfa245aa3f3994d3095afd696bbd3f0130594ab (diff)
parent855d2966385755435b65d77e1c0dfda17555eab9 (diff)
downloadphp-git-b9ad0002f5fc40f5808f85119a67012c2e9a4141.tar.gz
Merge branch 'master' into jsond
Diffstat (limited to 'Zend/zend_closures.c')
-rw-r--r--Zend/zend_closures.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index e4827f83b7..94ee585ddc 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -182,6 +182,7 @@ ZEND_API zend_function *zend_get_closure_invoke_method(zend_object *object TSRML
zend_function *invoke = (zend_function*)emalloc(sizeof(zend_function));
invoke->common = closure->func.common;
+ /* TODO: return ZEND_INTERNAL_FUNCTION, but arg_info representation is suitable for ZEND_USER_FUNCTION ??? */
invoke->type = ZEND_INTERNAL_FUNCTION;
invoke->internal_function.fn_flags = ZEND_ACC_PUBLIC | ZEND_ACC_CALL_VIA_HANDLER | (closure->func.common.fn_flags & ZEND_ACC_RETURN_REFERENCE);
invoke->internal_function.handler = ZEND_MN(Closure___invoke);
@@ -370,7 +371,7 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp TSRMLS_
if (arg_info->name) {
name = zend_strpprintf(0, "%s$%s",
arg_info->pass_by_reference ? "&" : "",
- arg_info->name);
+ arg_info->name->val);
} else {
name = zend_strpprintf(0, "%s$param%d",
arg_info->pass_by_reference ? "&" : "",
@@ -435,7 +436,7 @@ static const zend_function_entry closure_functions[] = {
ZEND_ME(Closure, bind, arginfo_closure_bind, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
ZEND_MALIAS(Closure, bindTo, bind, arginfo_closure_bindto, ZEND_ACC_PUBLIC)
ZEND_ME(Closure, call, arginfo_closure_call, ZEND_ACC_PUBLIC)
- {NULL, NULL, NULL}
+ ZEND_FE_END
};
void zend_register_closure_ce(TSRMLS_D) /* {{{ */
@@ -444,7 +445,7 @@ void zend_register_closure_ce(TSRMLS_D) /* {{{ */
INIT_CLASS_ENTRY(ce, "Closure", closure_functions);
zend_ce_closure = zend_register_internal_class(&ce TSRMLS_CC);
- zend_ce_closure->ce_flags |= ZEND_ACC_FINAL_CLASS;
+ zend_ce_closure->ce_flags |= ZEND_ACC_FINAL;
zend_ce_closure->create_object = zend_closure_new;
zend_ce_closure->serialize = zend_class_serialize_deny;
zend_ce_closure->unserialize = zend_class_unserialize_deny;