mirror of
https://github.com/phpv8/v8js.git
synced 2024-11-09 16:28:41 +00:00
Replaced deprecated v8 functions with newer equivalents
This commit is contained in:
parent
86f350597c
commit
b89f085888
@ -37,7 +37,7 @@ extern "C" {
|
||||
static v8::Handle<v8::Value> php_v8js_php_callback(const v8::Arguments &args) /* {{{ */
|
||||
{
|
||||
v8::Handle<v8::Value> return_value;
|
||||
zval *value = reinterpret_cast<zval *>(args.This()->GetPointerFromInternalField(0));
|
||||
zval *value = reinterpret_cast<zval *>(args.This()->GetAlignedPointerFromInternalField(0));
|
||||
zend_function *method_ptr;
|
||||
zend_fcall_info fci;
|
||||
zend_fcall_info_cache fcc;
|
||||
@ -50,7 +50,7 @@ static v8::Handle<v8::Value> php_v8js_php_callback(const v8::Arguments &args) /*
|
||||
|
||||
/* Set method_ptr from v8::External or fetch the closure invoker */
|
||||
if (!args.Data().IsEmpty() && args.Data()->IsExternal()) {
|
||||
method_ptr = static_cast<zend_function *>(v8::External::Unwrap(args.Data()));
|
||||
method_ptr = static_cast<zend_function *>(v8::External::Cast(*args.Data())->Value());
|
||||
} else {
|
||||
method_ptr = zend_get_closure_invoke_method(value TSRMLS_CC);
|
||||
}
|
||||
@ -384,7 +384,7 @@ static v8::Handle<v8::Value> php_v8js_hash_to_jsobj(zval *value TSRMLS_DC) /* {{
|
||||
newobj->SetHiddenValue(V8JS_SYM(ZEND_ISSET_FUNC_NAME), PHP_V8JS_CALLBACK(isset_ptr));
|
||||
}
|
||||
}
|
||||
newobj->SetPointerInInternalField(0, (void *) value);
|
||||
newobj->SetAlignedPointerInInternalField(0, (void *) value);
|
||||
} else {
|
||||
new_tpl->SetClassName(V8JS_SYM("Array"));
|
||||
newobj = new_tpl->InstanceTemplate()->NewInstance();
|
||||
|
Loading…
Reference in New Issue
Block a user