diff options
author | James Moore <jmoore@php.net> | 2001-05-20 17:06:39 +0000 |
---|---|---|
committer | James Moore <jmoore@php.net> | 2001-05-20 17:06:39 +0000 |
commit | c1164ad5bf728c8fc89f9356e2f38a5c7194c392 (patch) | |
tree | d1d7ce8c6c88cadf18b41d44102eadaf5f4e0e77 /Zend/zend_list.c | |
parent | 65d9584ac023f7467281c663c1a0b22614ad1fd2 (diff) | |
download | php-git-c1164ad5bf728c8fc89f9356e2f38a5c7194c392.tar.gz |
@ - Add new ZEND_GET_LE macro for retrieving destructor
@ id's from remote extensions. (Jmoore, Zend Engine)
Diffstat (limited to 'Zend/zend_list.c')
-rw-r--r-- | Zend/zend_list.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/zend_list.c b/Zend/zend_list.c index bfab8176d2..2119c25a86 100644 --- a/Zend/zend_list.c +++ b/Zend/zend_list.c @@ -317,6 +317,25 @@ ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_fu return list_destructors.nNextFreeElement-1; } +ZEND_API int zend_fetch_list_dtor_id(char *type_name) +{ + zend_rsrc_list_dtors_entry *lde; + HashPosition pos; + + zend_hash_internal_pointer_reset_ex(&list_destructors, &pos); + while(zend_hash_get_current_data_ex(&list_destructors, (void **)&lde, &pos) == SUCCESS) { + if(strcmp(type_name, lde->type_name) == 0) + { +#if 0 + printf("Found resource id %d for resource type %s\n",(*lde).resource_id,type_name); +#endif + return lde->resource_id; + } + zend_hash_move_forward_ex(&list_destructors, &pos); + } + + return 0; +} int zend_init_rsrc_list_dtors(void) { |