0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-11-10 01:28:42 +00:00

Use the Z_ADDREF_P macro to increasing the refcount of PHP values assigned to V8.

This commit is contained in:
Simon Best 2013-03-24 16:30:21 +00:00
parent 84baa7614a
commit a20c4b84cc

View File

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