- Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathzend_closures.h
46 lines (37 loc) · 2.26 KB
/
zend_closures.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Christian Seiler <chris_se@gmx.net> |
| Dmitry Stogov <dmitry@php.net> |
+----------------------------------------------------------------------+
*/
#ifndefZEND_CLOSURES_H
#defineZEND_CLOSURES_H
#include"zend_types.h"
BEGIN_EXTERN_C()
/* This macro depends on zend_closure structure layout */
#defineZEND_CLOSURE_OBJECT(op_array) \
((zend_object*)((char*)(op_array) - sizeof(zend_object)))
voidzend_register_closure_ce(void);
voidzend_closure_bind_var(zval*closure_zv, zend_string*var_name, zval*var);
voidzend_closure_bind_var_ex(zval*closure_zv, uint32_toffset, zval*val);
voidzend_closure_from_frame(zval*closure_zv, zend_execute_data*frame);
externZEND_APIzend_class_entry*zend_ce_closure;
ZEND_APIvoidzend_create_closure(zval*res, zend_function*op_array, zend_class_entry*scope, zend_class_entry*called_scope, zval*this_ptr);
ZEND_APIvoidzend_create_fake_closure(zval*res, zend_function*op_array, zend_class_entry*scope, zend_class_entry*called_scope, zval*this_ptr);
ZEND_APIzend_function*zend_get_closure_invoke_method(zend_object*obj);
ZEND_APIconstzend_function*zend_get_closure_method_def(zend_object*obj);
ZEND_APIzval*zend_get_closure_this_ptr(zval*obj);
END_EXTERN_C()
#endif