mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 09:21:52 +00:00
Fixed tab-based indentation
This commit is contained in:
parent
34d944a9f5
commit
f696867dc2
@ -1008,14 +1008,14 @@ static v8::MaybeLocal<v8::Object> v8js_wrap_object(v8::Isolate *isolate, zend_cl
|
|||||||
v8::MaybeLocal<v8::Object> newobj = constr->NewInstance(v8_context, 1, &external);
|
v8::MaybeLocal<v8::Object> newobj = constr->NewInstance(v8_context, 1, &external);
|
||||||
|
|
||||||
bool has_json_serializable = false;
|
bool has_json_serializable = false;
|
||||||
for (unsigned int i = 0; i < ce->num_interfaces; i ++) {
|
for (unsigned int i = 0; i < ce->num_interfaces; i ++) {
|
||||||
if (strcmp (ZSTR_VAL(ce->interfaces[i]->name), "JsonSerializable") == 0) {
|
if (strcmp (ZSTR_VAL(ce->interfaces[i]->name), "JsonSerializable") == 0) {
|
||||||
has_json_serializable = true;
|
has_json_serializable = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (has_json_serializable) {
|
if (has_json_serializable) {
|
||||||
zend_string *jsonserialize_str = zend_string_init
|
zend_string *jsonserialize_str = zend_string_init
|
||||||
("jsonSerialize", sizeof("jsonSerialize") - 1, 0);
|
("jsonSerialize", sizeof("jsonSerialize") - 1, 0);
|
||||||
zend_function *jsonserialize_method_ptr = reinterpret_cast<zend_function *>
|
zend_function *jsonserialize_method_ptr = reinterpret_cast<zend_function *>
|
||||||
@ -1033,7 +1033,7 @@ static v8::MaybeLocal<v8::Object> v8js_wrap_object(v8::Isolate *isolate, zend_cl
|
|||||||
|
|
||||||
newobj.ToLocalChecked()->CreateDataProperty(v8_context, method_name, ft->GetFunction(v8_context).ToLocalChecked());
|
newobj.ToLocalChecked()->CreateDataProperty(v8_context, method_name, ft->GetFunction(v8_context).ToLocalChecked());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ce == zend_ce_closure && !newobj.IsEmpty()) {
|
if (ce == zend_ce_closure && !newobj.IsEmpty()) {
|
||||||
// free uncached function template when object is freed
|
// free uncached function template when object is freed
|
||||||
|
Loading…
Reference in New Issue
Block a user