Lines Matching refs:referent
25 zend_object *referent; member
38 GC_DEL_FLAGS(wr->referent, IS_OBJ_WEAKLY_REFERENCED); in zend_weakref_unref()
40 wr->referent = NULL; in zend_weakref_unref()
65 static zend_always_inline zend_bool zend_weakref_find(zval *referent, zval *return_value) { in zend_weakref_find() argument
66 zend_weakref *wr = zend_hash_index_find_ptr(&EG(weakrefs), (zend_ulong) Z_OBJ_P(referent)); in zend_weakref_find()
78 static zend_always_inline void zend_weakref_create(zval *referent, zval *return_value) { in zend_weakref_create() argument
85 wr->referent = Z_OBJ_P(referent); in zend_weakref_create()
87 zend_hash_index_add_ptr(&EG(weakrefs), (zend_ulong) wr->referent, wr); in zend_weakref_create()
89 GC_ADD_FLAGS(wr->referent, IS_OBJ_WEAKLY_REFERENCED); in zend_weakref_create()
95 if (wr->referent) { in zend_weakref_get()
96 ZVAL_OBJ(return_value, wr->referent); in zend_weakref_get()
104 if (wr->referent) { in zend_weakref_free()
106 &EG(weakrefs), (zend_ulong) wr->referent); in zend_weakref_free()
146 ZEND_ARG_TYPE_INFO(0, referent, IS_OBJECT, 0)
161 zval *referent; in ZEND_METHOD() local
164 Z_PARAM_OBJECT(referent) in ZEND_METHOD()
167 if (zend_weakref_find(referent, return_value)) { in ZEND_METHOD()
171 zend_weakref_create(referent, return_value); in ZEND_METHOD()