mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 14:01:53 +00:00
Use the Z_ADDREF_P macro to increasing the refcount of PHP values assigned to V8.
This commit is contained in:
parent
84baa7614a
commit
a20c4b84cc
@ -385,8 +385,9 @@ static v8::Handle<v8::Value> php_v8js_hash_to_jsobj(zval *value TSRMLS_DC) /* {{
|
||||
}
|
||||
}
|
||||
|
||||
// Increase the reference count of this value because we're storing it internally for use later
|
||||
// See https://github.com/preillyme/v8js/issues/6
|
||||
Z_SET_REFCOUNT_P(value, Z_REFCOUNT_P(value) + 1);
|
||||
Z_ADDREF_P(value);
|
||||
|
||||
newobj->SetAlignedPointerInInternalField(0, (void *) value);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user