36 zend_long index = zend_hash_next_free_element(&
EG(regular_list));
69 ld = zend_hash_index_find_ptr(&list_destructors, r.
type);
82 }
else if (
res->type >= 0) {
83 zend_resource_dtor(
res);
99 if (resource_type1 ==
res->type) {
103 if (resource_type2 ==
res->type) {
108 if (resource_type_name) {
119 if (resource_type ==
res->type) {
123 if (resource_type_name) {
134 const char *space, *class_name;
136 if (resource_type_name) {
143 if (resource_type_name) {
155 const char *space, *class_name;
157 if (resource_type_name) {
164 if (resource_type_name) {
179 if (
res->type >= 0) {
180 zend_resource_dtor(
res);
189 if (
res->type >= 0) {
192 ld = zend_hash_index_find_ptr(&list_destructors,
res->type);
205 EG(regular_list).nNextFreeElement = 0;
218 uint32_t i =
ht->nNumUsed;
224 if (
res->type >= 0) {
225 zend_resource_dtor(
res);
238static int clean_module_resource(
zval *
zv,
void *
arg)
240 int resource_id = *(
int *)
arg;
246static int zend_clean_module_rsrc_dtors_cb(
zval *
zv,
void *
arg)
249 int module_number = *(
int *)
arg;
274 lde->
resource_id = list_destructors.nNextFreeElement;
282 return list_destructors.nNextFreeElement-1;
298static void list_destructors_dtor(
zval *
zv)
306 list_destructors.nNextFreeElement=1;
320 lde = zend_hash_index_find_ptr(&list_destructors,
res->type);
unsigned char key[REFLECTION_KEY_LEN]
rsrc_dtor_func_t list_dtor_ex
rsrc_dtor_func_t plist_dtor_ex
ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char *format,...)
ZEND_API ZEND_COLD void zend_type_error(const char *format,...)
#define efree_size(ptr, size)
strcmp(string $string1, string $string2)
zend_string_release_ex(func->internal_function.function_name, 0)
ZEND_API const char * get_active_function_name(void)
ZEND_API const char * get_active_class_name(const char **space)
ZEND_API void ZEND_FASTCALL zend_hash_destroy(HashTable *ht)
ZEND_API zval *ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData)
ZEND_API zval *ZEND_FASTCALL zend_hash_index_add_new(HashTable *ht, zend_ulong h, zval *pData)
ZEND_API void ZEND_FASTCALL zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *argument)
ZEND_API zend_result ZEND_FASTCALL zend_hash_index_del(HashTable *ht, zend_ulong h)
ZEND_API void ZEND_FASTCALL zend_hash_graceful_reverse_destroy(HashTable *ht)
ZEND_API zval *ZEND_FASTCALL zend_hash_update(HashTable *ht, zend_string *key, zval *pData)
#define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent)
#define ZEND_HASH_ELEMENT(__ht, _idx)
#define ZEND_HASH_PACKED_FOREACH_PTR(ht, _ptr)
#define ZEND_HASH_FOREACH_END()
void zend_init_rsrc_list_dtors(void)
ZEND_API void * zend_fetch_resource(zend_resource *res, const char *resource_type_name, int resource_type)
void zend_clean_module_rsrc_dtors(int module_number)
ZEND_API int zend_fetch_list_dtor_id(const char *type_name)
ZEND_API zend_resource * zend_register_persistent_resource_ex(zend_string *key, void *rsrc_pointer, int rsrc_type)
ZEND_API void * zend_fetch_resource2(zend_resource *res, const char *resource_type_name, int resource_type1, int resource_type2)
void zend_destroy_rsrc_list_dtors(void)
void zend_init_rsrc_plist(void)
ZEND_API void zend_init_rsrc_list(void)
ZEND_API zend_resource * zend_register_resource(void *rsrc_pointer, int rsrc_type)
const char * zend_rsrc_list_get_rsrc_type(zend_resource *res)
void plist_entry_destructor(zval *zv)
ZEND_API zend_result ZEND_FASTCALL zend_list_delete(zend_resource *res)
ZEND_API void ZEND_FASTCALL zend_list_free(zend_resource *res)
ZEND_API zval *ZEND_FASTCALL zend_list_insert(void *ptr, int type)
void zend_destroy_rsrc_list(HashTable *ht)
void zend_close_rsrc_list(HashTable *ht)
ZEND_API zend_resource * zend_register_persistent_resource(const char *key, size_t key_len, void *rsrc_pointer, int rsrc_type)
ZEND_API void ZEND_FASTCALL zend_list_close(zend_resource *res)
ZEND_API void * zend_fetch_resource_ex(zval *res, const char *resource_type_name, int resource_type)
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, const char *type_name, int module_number)
ZEND_API void * zend_fetch_resource2_ex(zval *res, const char *resource_type_name, int resource_type1, int resource_type2)
void list_entry_destructor(zval *zv)
ZEND_API int le_index_ptr
struct _zend_rsrc_list_dtors_entry zend_rsrc_list_dtors_entry
void(* rsrc_dtor_func_t)(zend_resource *res)
struct _zend_string zend_string
struct _zend_resource zend_resource
struct _zend_array HashTable
#define GC_MAKE_PERSISTENT_LOCAL(p)
#define ZVAL_NEW_PERSISTENT_RES(z, h, p, t)
#define ZVAL_NEW_RES(z, h, p, t)
ZEND_RESULT_CODE zend_result
#define Z_RES_TYPE_P(zval_p)