mirror of
https://github.com/phpv8/v8js.git
synced 2024-11-08 13:48:40 +00:00
PHP7 adapt: initialize c->std.handlers as needed
This commit is contained in:
parent
fd6eeddc52
commit
a0f3c2302c
@ -190,6 +190,7 @@ static zend_object* v8js_new(zend_class_entry *ce TSRMLS_DC) /* {{{ */
|
||||
|
||||
c = (v8js_ctx *) ecalloc(1, sizeof(*c) + zend_object_properties_size(ce));
|
||||
zend_object_std_init(&c->std, ce TSRMLS_CC);
|
||||
c->std.handlers = &v8js_object_handlers;
|
||||
TSRMLS_SET_CTX(c->zts_ctx);
|
||||
|
||||
new(&c->object_name) v8::Persistent<v8::String>();
|
||||
|
@ -415,6 +415,7 @@ static zend_object *v8js_v8object_new(zend_class_entry *ce TSRMLS_DC) /* {{{ */
|
||||
c = (v8js_v8object *) ecalloc(1, sizeof(v8js_v8object) + zend_object_properties_size(ce));
|
||||
|
||||
zend_object_std_init(&c->std, ce TSRMLS_CC);
|
||||
c->std.handlers = &v8js_v8object_handlers;
|
||||
new(&c->v8obj) v8::Persistent<v8::Value>();
|
||||
|
||||
v8js_v8object_handlers.offset = XtOffsetOf(struct v8js_v8object, std);
|
||||
|
Loading…
Reference in New Issue
Block a user