Lines Matching refs:obj
51 struct _store_object *obj = &objects->object_buckets[i].bucket.obj; in zend_objects_store_call_destructors() local
55 if (obj->dtor && obj->object) { in zend_objects_store_call_destructors()
56 obj->refcount++; in zend_objects_store_call_destructors()
57 obj->dtor(obj->object, i TSRMLS_CC); in zend_objects_store_call_destructors()
58 obj = &objects->object_buckets[i].bucket.obj; in zend_objects_store_call_destructors()
59 obj->refcount--; in zend_objects_store_call_destructors()
86 struct _store_object *obj = &objects->object_buckets[i].bucket.obj; in zend_objects_store_free_object_storage() local
88 GC_REMOVE_ZOBJ_FROM_BUFFER(obj); in zend_objects_store_free_object_storage()
91 if (obj->free_storage) { in zend_objects_store_free_object_storage()
92 obj->free_storage(obj->object TSRMLS_CC); in zend_objects_store_free_object_storage()
105 struct _store_object *obj; in zend_objects_store_put() local
117 obj = &EG(objects_store).object_buckets[handle].bucket.obj; in zend_objects_store_put()
121 obj->refcount = 1; in zend_objects_store_put()
122 GC_OBJ_INIT(obj); in zend_objects_store_put()
123 obj->object = object; in zend_objects_store_put()
124 obj->dtor = dtor?dtor:(zend_objects_store_dtor_t)zend_objects_destroy_object; in zend_objects_store_put()
125 obj->free_storage = free_storage; in zend_objects_store_put()
126 obj->clone = clone; in zend_objects_store_put()
127 obj->handlers = NULL; in zend_objects_store_put()
139 return EG(objects_store).object_buckets[handle].bucket.obj.refcount; in zend_objects_store_get_refcount()
146 EG(objects_store).object_buckets[handle].bucket.obj.refcount++; in zend_objects_store_add_ref()
157 EG(objects_store).object_buckets[handle].bucket.obj.refcount++; in zend_objects_store_add_ref_by_handle()
183 struct _store_object *obj; in zend_objects_store_del_ref_by_handle_ex() local
190 obj = &EG(objects_store).object_buckets[handle].bucket.obj; in zend_objects_store_del_ref_by_handle_ex()
197 if (obj->refcount == 1) { in zend_objects_store_del_ref_by_handle_ex()
201 if (obj->dtor) { in zend_objects_store_del_ref_by_handle_ex()
202 if (handlers && !obj->handlers) { in zend_objects_store_del_ref_by_handle_ex()
203 obj->handlers = handlers; in zend_objects_store_del_ref_by_handle_ex()
206 obj->dtor(obj->object, handle TSRMLS_CC); in zend_objects_store_del_ref_by_handle_ex()
214 obj = &EG(objects_store).object_buckets[handle].bucket.obj; in zend_objects_store_del_ref_by_handle_ex()
216 if (obj->refcount == 1) { in zend_objects_store_del_ref_by_handle_ex()
217 GC_REMOVE_ZOBJ_FROM_BUFFER(obj); in zend_objects_store_del_ref_by_handle_ex()
218 if (obj->free_storage) { in zend_objects_store_del_ref_by_handle_ex()
220 obj->free_storage(obj->object TSRMLS_CC); in zend_objects_store_del_ref_by_handle_ex()
230 obj->refcount--; in zend_objects_store_del_ref_by_handle_ex()
233 if (obj->refcount == 0) { in zend_objects_store_del_ref_by_handle_ex()
249 struct _store_object *obj; in zend_objects_store_clone_obj() local
252 obj = &EG(objects_store).object_buckets[handle].bucket.obj; in zend_objects_store_clone_obj()
254 if (obj->clone == NULL) { in zend_objects_store_clone_obj()
258 obj->clone(obj->object, &new_object TSRMLS_CC); in zend_objects_store_clone_obj()
259 obj = &EG(objects_store).object_buckets[handle].bucket.obj; in zend_objects_store_clone_obj()
261 …retval.handle = zend_objects_store_put(new_object, obj->dtor, obj->free_storage, obj->clone TSRMLS… in zend_objects_store_clone_obj()
263 EG(objects_store).object_buckets[handle].bucket.obj.handlers = retval.handlers; in zend_objects_store_clone_obj()
272 return EG(objects_store).object_buckets[handle].bucket.obj.object; in zend_object_store_get_object()
280 return EG(objects_store).object_buckets[handle].bucket.obj.object; in zend_object_store_get_object_by_handle()
294 EG(objects_store).object_buckets[handle].bucket.obj.object = object; in zend_object_store_set_object()
304 obj_bucket->bucket.obj.handlers = Z_OBJ_HT_P(zobject);; in zend_object_store_ctor_failed()