# HG changeset patch # User Mike Becker # Date 1612729791 -3600 # Node ID 44efaa54d63dab0a50d54485d9e012f95340d59d # Parent 86ebc3745e620843895ec6ada07ada74d69478f0 removes unnecessary typedefs diff -r 86ebc3745e62 -r 44efaa54d63d src/cx/allocator.h --- a/src/cx/allocator.h Sun Feb 07 21:26:48 2021 +0100 +++ b/src/cx/allocator.h Sun Feb 07 21:29:51 2021 +0100 @@ -31,19 +31,11 @@ #include -typedef void *(*cx_malloc_func)(void *data, size_t n); - -typedef void *(*cx_realloc_func)(void *data, void *mem, size_t n); - -typedef void *(*cx_calloc_func)(void *data, size_t nelem, size_t n); - -typedef void(*cx_free_func)(void *data, void *mem); - typedef struct { - cx_malloc_func malloc; - cx_realloc_func realloc; - cx_calloc_func calloc; - cx_free_func free; + void *(*malloc)(void *data, size_t n); + void *(*realloc)(void *data, void *mem, size_t n); + void *(*calloc)(void *data, size_t nelem, size_t n); + void(*free)(void *data, void *mem); } cx_allocator_class; extern cx_allocator_class cx_default_allocator_class; diff -r 86ebc3745e62 -r 44efaa54d63d src/cx/list.h --- a/src/cx/list.h Sun Feb 07 21:26:48 2021 +0100 +++ b/src/cx/list.h Sun Feb 07 21:29:51 2021 +0100 @@ -43,22 +43,12 @@ void *listdata; } cx_list; -typedef int (*cx_list_add)(cx_list *list, void *elem); - -typedef int (*cx_list_insert)(cx_list *list, size_t index, void *elem); - -typedef void *(*cx_list_remove)(cx_list *list, size_t index); - -typedef size_t (*cx_list_find)(cx_list *list, void *elem); - -typedef void *(*cx_list_last)(cx_list *list); - typedef struct { - cx_list_add add; - cx_list_insert insert; - cx_list_remove remove; - cx_list_find find; - cx_list_last last; + int (*add)(cx_list *list, void *elem); + int (*insert)(cx_list *list, size_t index, void *elem); + void *(*remove)(cx_list *list, size_t index); + size_t (*find)(cx_list *list, void *elem); + void *(*last)(cx_list *list); } cx_list_class; struct cx_list_s {