- MFH Fix refcounting

This commit is contained in:
Marcus Boerger 2009-01-03 18:22:20 +00:00
parent 0e131653c1
commit b7bb8034b5
2 changed files with 50 additions and 0 deletions

View file

@ -124,7 +124,13 @@ ZEND_API zval* zend_closure_copy(zval *closure_obj, zval *this_ptr TSRMLS_DC) /*
zval_copy_ctor(closure_obj);
closure = (zend_closure *)zend_object_store_get_object(closure_obj TSRMLS_CC);
if (closure->this_ptr) {
zval_ptr_dtor(&closure->this_ptr);
}
closure->this_ptr = this_ptr;
if (this_ptr) {
Z_ADDREF_P(this_ptr);
}
return closure_obj;
}
/* }}} */