mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 19:51:51 +00:00
Fix for https://github.com/preillyme/v8js/issues/6. This is probably …
… horrible hack but it works for now until we have a better solution.
This commit is contained in:
parent
0db973bee3
commit
edb8609cfe
@ -384,6 +384,13 @@ 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->SetHiddenValue(V8JS_SYM(ZEND_ISSET_FUNC_NAME), PHP_V8JS_CALLBACK(isset_ptr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// See https://github.com/preillyme/v8js/issues/6
|
||||||
|
if (Z_REFCOUNT_P(value) == 1)
|
||||||
|
{
|
||||||
|
Z_SET_REFCOUNT_P(value, 2);
|
||||||
|
}
|
||||||
|
|
||||||
newobj->SetAlignedPointerInInternalField(0, (void *) value);
|
newobj->SetAlignedPointerInInternalField(0, (void *) value);
|
||||||
} else {
|
} else {
|
||||||
new_tpl->SetClassName(V8JS_SYM("Array"));
|
new_tpl->SetClassName(V8JS_SYM("Array"));
|
||||||
|
Loading…
Reference in New Issue
Block a user