0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 15:11:53 +00:00

Call INIT_ZVAL on stack-allocated zval

This commit is contained in:
Stefan Siegl 2014-04-11 20:15:51 +02:00
parent b188f9882f
commit c866e67313
2 changed files with 6 additions and 0 deletions

View File

@ -932,6 +932,7 @@ static PHP_METHOD(V8Js, __construct)
} }
zval zmember; zval zmember;
INIT_ZVAL(zmember);
ZVAL_STRING(&zmember, member, 0); ZVAL_STRING(&zmember, member, 0);
zend_property_info *property_info = zend_get_property_info(c->std.ce, &zmember, 1 TSRMLS_CC); zend_property_info *property_info = zend_get_property_info(c->std.ce, &zmember, 1 TSRMLS_CC);

View File

@ -48,6 +48,7 @@ static void php_v8js_call_php_func(zval *value, zend_class_entry *ce, zend_funct
max_num_args = method_ptr->common.num_args; max_num_args = method_ptr->common.num_args;
/* Function name to call */ /* Function name to call */
INIT_ZVAL(fname);
ZVAL_STRING(&fname, method_ptr->common.function_name, 0); ZVAL_STRING(&fname, method_ptr->common.function_name, 0);
/* zend_fcall_info */ /* zend_fcall_info */
@ -605,6 +606,7 @@ static inline v8::Local<v8::Value> php_v8js_named_property_callback(v8::Local<v8
if (callback_type == V8JS_PROP_GETTER) { if (callback_type == V8JS_PROP_GETTER) {
/* Nope, not a method -- must be a (case-sensitive) property */ /* Nope, not a method -- must be a (case-sensitive) property */
zval zname; zval zname;
INIT_ZVAL(zname);
ZVAL_STRINGL(&zname, name, name_len, 0); ZVAL_STRINGL(&zname, name, name_len, 0);
zend_property_info *property_info = zend_get_property_info(ce, &zname, 1 TSRMLS_CC); zend_property_info *property_info = zend_get_property_info(ce, &zname, 1 TSRMLS_CC);
@ -632,6 +634,7 @@ static inline v8::Local<v8::Value> php_v8js_named_property_callback(v8::Local<v8
zend_fcall_info fci; zend_fcall_info fci;
zval fmember; zval fmember;
INIT_ZVAL(fmember);
ZVAL_STRING(&fmember, "__get", 0); ZVAL_STRING(&fmember, "__get", 0);
fci.size = sizeof(fci); fci.size = sizeof(fci);
@ -665,6 +668,7 @@ static inline v8::Local<v8::Value> php_v8js_named_property_callback(v8::Local<v8
} }
else { else {
zval zname; zval zname;
INIT_ZVAL(zname);
ZVAL_STRINGL(&zname, name, name_len, 0); ZVAL_STRINGL(&zname, name, name_len, 0);
zend_property_info *property_info = zend_get_property_info(ce, &zname, 1 TSRMLS_CC); zend_property_info *property_info = zend_get_property_info(ce, &zname, 1 TSRMLS_CC);
@ -679,6 +683,7 @@ static inline v8::Local<v8::Value> php_v8js_named_property_callback(v8::Local<v8
zend_fcall_info fci; zend_fcall_info fci;
zval fmember; zval fmember;
INIT_ZVAL(fmember);
ZVAL_STRING(&fmember, "__set", 0); ZVAL_STRING(&fmember, "__set", 0);
zval *php_ret_value; zval *php_ret_value;