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()
61 if (obj->refcount == 0) { in zend_objects_store_call_destructors()
63 GC_REMOVE_ZOBJ_FROM_BUFFER(obj); in zend_objects_store_call_destructors()
91 struct _store_object *obj = &objects->object_buckets[i].bucket.obj; in zend_objects_store_free_object_storage() local
93 GC_REMOVE_ZOBJ_FROM_BUFFER(obj); in zend_objects_store_free_object_storage()
96 if (obj->free_storage) { in zend_objects_store_free_object_storage()
97 obj->free_storage(obj->object TSRMLS_CC); in zend_objects_store_free_object_storage()
110 struct _store_object *obj; in zend_objects_store_put() local
122 obj = &EG(objects_store).object_buckets[handle].bucket.obj; in zend_objects_store_put()
127 obj->refcount = 1; in zend_objects_store_put()
128 GC_OBJ_INIT(obj); in zend_objects_store_put()
129 obj->object = object; in zend_objects_store_put()
130 obj->dtor = dtor?dtor:(zend_objects_store_dtor_t)zend_objects_destroy_object; in zend_objects_store_put()
131 obj->free_storage = free_storage; in zend_objects_store_put()
132 obj->clone = clone; in zend_objects_store_put()
133 obj->handlers = NULL; in zend_objects_store_put()
145 return EG(objects_store).object_buckets[handle].bucket.obj.refcount; in zend_objects_store_get_refcount()
152 EG(objects_store).object_buckets[handle].bucket.obj.refcount++; in zend_objects_store_add_ref()
163 EG(objects_store).object_buckets[handle].bucket.obj.refcount++; in zend_objects_store_add_ref_by_handle()
189 struct _store_object *obj; in zend_objects_store_del_ref_by_handle_ex() local
196 obj = &EG(objects_store).object_buckets[handle].bucket.obj; in zend_objects_store_del_ref_by_handle_ex()
203 if (obj->refcount == 1) { in zend_objects_store_del_ref_by_handle_ex()
207 if (obj->dtor) { in zend_objects_store_del_ref_by_handle_ex()
208 if (handlers && !obj->handlers) { in zend_objects_store_del_ref_by_handle_ex()
209 obj->handlers = handlers; in zend_objects_store_del_ref_by_handle_ex()
212 obj->dtor(obj->object, handle TSRMLS_CC); in zend_objects_store_del_ref_by_handle_ex()
220 obj = &EG(objects_store).object_buckets[handle].bucket.obj; in zend_objects_store_del_ref_by_handle_ex()
222 if (obj->refcount == 1) { in zend_objects_store_del_ref_by_handle_ex()
223 GC_REMOVE_ZOBJ_FROM_BUFFER(obj); in zend_objects_store_del_ref_by_handle_ex()
224 if (obj->free_storage) { in zend_objects_store_del_ref_by_handle_ex()
226 obj->free_storage(obj->object TSRMLS_CC); in zend_objects_store_del_ref_by_handle_ex()
236 obj->refcount--; in zend_objects_store_del_ref_by_handle_ex()
239 if (obj->refcount == 0) { in zend_objects_store_del_ref_by_handle_ex()
255 struct _store_object *obj; in zend_objects_store_clone_obj() local
258 obj = &EG(objects_store).object_buckets[handle].bucket.obj; in zend_objects_store_clone_obj()
260 if (obj->clone == NULL) { in zend_objects_store_clone_obj()
264 obj->clone(obj->object, &new_object TSRMLS_CC); in zend_objects_store_clone_obj()
265 obj = &EG(objects_store).object_buckets[handle].bucket.obj; in zend_objects_store_clone_obj()
267 …retval.handle = zend_objects_store_put(new_object, obj->dtor, obj->free_storage, obj->clone TSRMLS… in zend_objects_store_clone_obj()
269 EG(objects_store).object_buckets[handle].bucket.obj.handlers = retval.handlers; in zend_objects_store_clone_obj()
278 return EG(objects_store).object_buckets[handle].bucket.obj.object; in zend_object_store_get_object()
286 return EG(objects_store).object_buckets[handle].bucket.obj.object; in zend_object_store_get_object_by_handle()
300 EG(objects_store).object_buckets[handle].bucket.obj.object = object; in zend_object_store_set_object()
310 obj_bucket->bucket.obj.handlers = Z_OBJ_HT_P(zobject);; in zend_object_store_ctor_failed()