0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-09-20 00:45:19 +00:00

zend_fetch_class_by_name is not available in PHP 5.3

This commit is contained in:
Stefan Siegl 2014-08-10 17:59:15 +02:00
parent 50b36d2cf5
commit 3947d8690c

View File

@ -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 {