0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-11-08 14:48:40 +00:00

adapt to changed ZVAL_STRING/ZVAL_STRINGL/RETVAL_STRINGL macros

This commit is contained in:
Stefan Siegl 2015-08-23 21:14:49 +02:00
parent 45f7e18624
commit 8389e126b5
5 changed files with 11 additions and 19 deletions

View File

@ -37,11 +37,9 @@ static zval *v8js_array_access_dispatch(zval *object, const char *method_name, i
zval *php_value;
zval fmember;
INIT_ZVAL(fmember);
ZVAL_STRING(&fmember, method_name, 0);
ZVAL_STRING(&fmember, method_name);
zval zindex;
INIT_ZVAL(zindex);
ZVAL_LONG(&zindex, index);
fci.size = sizeof(fci);

View File

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

View File

@ -171,8 +171,7 @@ int v8js_to_zval(v8::Handle<v8::Value> jsValue, zval *return_value, int flags, v
{
v8::String::Utf8Value str(jsValue);
const char *cstr = ToCString(str);
RETVAL_STRINGL(cstr, jsValue->ToString()->Utf8Length(), 1);
// RETVAL_STRING(cstr, 1);
RETVAL_STRINGL(cstr, jsValue->ToString()->Utf8Length());
}
else if (jsValue->IsBoolean())
{

View File

@ -268,7 +268,7 @@ V8JS_METHOD(require)
zval *normalised_path_zend;
MAKE_STD_ZVAL(normalised_path_zend);
ZVAL_STRING(normalised_path_zend, normalised_module_id, 1);
ZVAL_STRING(normalised_path_zend, normalised_module_id);
zval **params[1] = {&normalised_path_zend};
if (FAILURE == call_user_function_ex(EG(function_table), NULL, c->module_loader, &module_code, 1, params, 0, NULL TSRMLS_CC)) {

View File

@ -48,13 +48,12 @@ static void v8js_call_php_func(zval *value, zend_class_entry *ce, zend_function
max_num_args = method_ptr->common.num_args;
/* Function name to call */
INIT_ZVAL(fname);
ZVAL_STRING(&fname, method_ptr->common.function_name, 0);
ZVAL_STRING(&fname, method_ptr->common.function_name);
/* zend_fcall_info */
fci.size = sizeof(fci);
fci.function_table = &ce->function_table;
fci.function_name = &fname;
fci.function_name = fname;
fci.symbol_table = NULL;
fci.object_ptr = value;
fci.retval_ptr_ptr = &retval_ptr;
@ -598,7 +597,7 @@ inline v8::Local<v8::Value> v8js_named_property_callback(v8::Local<v8::String> p
/* Nope, not a method -- must be a (case-sensitive) property */
zval zname;
INIT_ZVAL(zname);
ZVAL_STRINGL(&zname, name, name_len, 0);
ZVAL_STRINGL(&zname, name, name_len);
zend_property_info *property_info = zend_get_property_info(ce, &zname, 1 TSRMLS_CC);
if(property_info && property_info->flags & ZEND_ACC_PUBLIC) {
@ -625,8 +624,7 @@ inline v8::Local<v8::Value> v8js_named_property_callback(v8::Local<v8::String> p
zend_fcall_info fci;
zval fmember;
INIT_ZVAL(fmember);
ZVAL_STRING(&fmember, "__get", 0);
ZVAL_STRING(&fmember, "__get");
fci.size = sizeof(fci);
fci.function_table = &ce->function_table;
@ -655,8 +653,7 @@ inline v8::Local<v8::Value> v8js_named_property_callback(v8::Local<v8::String> p
}
else {
zval zname;
INIT_ZVAL(zname);
ZVAL_STRINGL(&zname, name, name_len, 0);
ZVAL_STRINGL(&zname, name, name_len);
zend_property_info *property_info = zend_get_property_info(ce, &zname, 1 TSRMLS_CC);
if(property_info && property_info->flags & ZEND_ACC_PUBLIC) {
@ -670,8 +667,7 @@ inline v8::Local<v8::Value> v8js_named_property_callback(v8::Local<v8::String> p
zend_fcall_info fci;
zval fmember;
INIT_ZVAL(fmember);
ZVAL_STRING(&fmember, "__set", 0);
ZVAL_STRING(&fmember, "__set");
zval *php_ret_value;
@ -705,7 +701,7 @@ inline v8::Local<v8::Value> v8js_named_property_callback(v8::Local<v8::String> p
const zend_object_handlers *h = Z_OBJ_HT_P(object);
zval *prop;
MAKE_STD_ZVAL(prop);
ZVAL_STRINGL(prop, name, name_len, 1);
ZVAL_STRINGL(prop, name, name_len);
if (callback_type == V8JS_PROP_QUERY) {
if (h->has_property(object, prop, 0 ZEND_HASH_KEY_NULL TSRMLS_CC)) {