summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-03-11 15:38:49 +0300
committerDmitry Stogov <dmitry@zend.com>2019-03-11 15:38:49 +0300
commite7f0a60d54d4c6820141251b51f62d8c3424d467 (patch)
tree0bcf62f9737f54efffd7eb7ea23ce7e156053f64 /ext
parente623df650fd099325154ffd43cc19002e1cb619e (diff)
downloadphp-git-e7f0a60d54d4c6820141251b51f62d8c3424d467.tar.gz
Reset fields
Diffstat (limited to 'ext')
-rw-r--r--ext/ffi/ffi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c
index f9c7fe091a..1885c63ddc 100644
--- a/ext/ffi/ffi.c
+++ b/ext/ffi/ffi.c
@@ -1877,8 +1877,11 @@ static int zend_ffi_cdata_get_closure(zval *obj, zend_class_entry **ce_ptr, zend
/* set to 0 to avoid arg_info[] allocation, because all values are passed by value anyway */
func->common.num_args = 0;
func->common.required_num_args = type->func.args ? zend_hash_num_elements(type->func.args) : 0;
+ func->common.scope = NULL;
+ func->common.prototype = NULL;
func->common.arg_info = NULL;
func->internal_function.handler = ZEND_FN(ffi_trampoline);
+ func->internal_function.module = NULL;
func->internal_function.reserved[0] = type;
func->internal_function.reserved[1] = *(void**)cdata->ptr;
@@ -2607,8 +2610,11 @@ static zend_function *zend_ffi_get_func(zend_object **obj, zend_string *name, co
/* set to 0 to avoid arg_info[] allocation, because all values are passed by value anyway */
func->common.num_args = 0;
func->common.required_num_args = type->func.args ? zend_hash_num_elements(type->func.args) : 0;
+ func->common.scope = NULL;
+ func->common.prototype = NULL;
func->common.arg_info = NULL;
func->internal_function.handler = ZEND_FN(ffi_trampoline);
+ func->internal_function.module = NULL;
func->internal_function.reserved[0] = type;
func->internal_function.reserved[1] = sym->addr;