mirror of
https://github.com/phpv8/v8js.git
synced 2025-03-11 22:18:44 +00:00
zend_fetch_class_by_name is not available in PHP 5.3
This commit is contained in:
parent
50b36d2cf5
commit
3947d8690c
@ -504,10 +504,11 @@ static void php_v8js_invoke_callback(const v8::FunctionCallbackInfo<v8::Value>&
|
||||
v8::String::Utf8Value str(self->GetConstructorName()->ToString());
|
||||
const char *constructor_name = ToCString(str);
|
||||
|
||||
zend_class_entry *ce = zend_fetch_class_by_name(constructor_name, str.length(), NULL, 0);
|
||||
zend_class_entry **pce;
|
||||
zend_lookup_class(constructor_name, str.length(), &pce);
|
||||
v8::Local<v8::FunctionTemplate> new_tpl;
|
||||
new_tpl = v8::Local<v8::FunctionTemplate>::New
|
||||
(isolate, ctx->template_cache.at(ce->name));
|
||||
(isolate, ctx->template_cache.at((*pce)->name));
|
||||
|
||||
result = new_tpl->GetFunction()->NewInstance(argc, argv);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user