mirror of
https://github.com/phpv8/v8js.git
synced 2025-01-03 13:21:52 +00:00
Copy default_properties to new object (PHP 5.3)
This commit is contained in:
parent
683ac347c7
commit
8eb5721c35
4
v8js.cc
4
v8js.cc
@ -536,6 +536,10 @@ static zend_object_value php_v8js_new(zend_class_entry *ce TSRMLS_DC) /* {{{ */
|
|||||||
zend_object_std_init(&c->std, ce TSRMLS_CC);
|
zend_object_std_init(&c->std, ce TSRMLS_CC);
|
||||||
#if PHP_VERSION_ID >= 50400
|
#if PHP_VERSION_ID >= 50400
|
||||||
object_properties_init(&c->std, ce);
|
object_properties_init(&c->std, ce);
|
||||||
|
#else
|
||||||
|
zval *tmp;
|
||||||
|
zend_hash_copy(c->std.properties, &ce->default_properties,
|
||||||
|
(copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
retval.handle = zend_objects_store_put(c, NULL, (zend_objects_free_object_storage_t) php_v8js_free_storage, NULL TSRMLS_CC);
|
retval.handle = zend_objects_store_put(c, NULL, (zend_objects_free_object_storage_t) php_v8js_free_storage, NULL TSRMLS_CC);
|
||||||
|
Loading…
Reference in New Issue
Block a user