diff options
author | Andi Gutmans <andi@php.net> | 2001-04-21 11:44:00 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2001-04-21 11:44:00 +0000 |
commit | 9dd0231844ab98f306c977e01ca27b6fbd791b93 (patch) | |
tree | 2081a660235eabb6c3e7a93cacc6604c4f90b9eb /Zend/zend_llist.h | |
parent | a6f90ec7c6b2812614647c2fee238ea982b4ccf7 (diff) | |
download | php-git-9dd0231844ab98f306c977e01ca27b6fbd791b93.tar.gz |
- Add typedef for function pointer of llist dtor
Diffstat (limited to 'Zend/zend_llist.h')
-rw-r--r-- | Zend/zend_llist.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Zend/zend_llist.h b/Zend/zend_llist.h index 1fc888d95f..420c214e1a 100644 --- a/Zend/zend_llist.h +++ b/Zend/zend_llist.h @@ -29,24 +29,25 @@ typedef struct _zend_llist_element { char data[1]; /* Needs to always be last in the struct */ } zend_llist_element; +typedef void (*llist_dtor_func_t)(void *); +typedef int (*llist_compare_func_t)(const zend_llist_element *, const zend_llist_element *); +typedef void (*llist_apply_with_arg_func_t)(void *data, void *arg); +typedef void (*llist_apply_with_args_func_t)(void *data, int num_args, va_list args); +typedef void (*llist_apply_func_t)(void *); + typedef struct _zend_llist { zend_llist_element *head; zend_llist_element *tail; size_t size; - void (*dtor)(void *data); + llist_dtor_func_t dtor; unsigned char persistent; zend_llist_element *traverse_ptr; } zend_llist; -typedef int (*llist_compare_func_t)(const zend_llist_element *, const zend_llist_element *); -typedef void(*llist_apply_with_arg_func_t)(void *data, void *arg); -typedef void(*llist_apply_with_args_func_t)(void *data, int num_args, va_list args); -typedef void (*llist_apply_func_t)(void *); - typedef zend_llist_element* zend_llist_position; BEGIN_EXTERN_C() -ZEND_API void zend_llist_init(zend_llist *l, size_t size, void (*dtor)(void *data), unsigned char persistent); +ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent); ZEND_API void zend_llist_add_element(zend_llist *l, void *element); ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element); ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2)); |