# HG changeset patch # User Mike Becker # Date 1650134687 -7200 # Node ID 79d14e821b3a000d5a39691171e55074b2a3ff29 # Parent 74d0372f5c6fd6ca2ca1884e438a6a7ccaf4539d make cxListMemoryMgmt a linkable symbol diff -r 74d0372f5c6f -r 79d14e821b3a src/cx/list.h --- a/src/cx/list.h Sat Apr 16 20:17:01 2022 +0200 +++ b/src/cx/list.h Sat Apr 16 20:44:47 2022 +0200 @@ -203,18 +203,13 @@ * if the content destructor did not do that or no content destructor exists */ __attribute__((__nonnull__(1))) -static inline void cxListMemoryMgmt( +void cxListMemoryMgmt( CxList *list, cx_destructor_func list_destructor, cx_destructor_func content_destructor, bool list_autofree, bool content_autofree -) { - if (list_destructor != NULL) list->list_destructor = list_destructor; - list->content_destructor = content_destructor; - list->autofree = list_autofree; - list->autofree_contents = content_autofree; -} +); /** * Adds an item to the end of the list. diff -r 74d0372f5c6f -r 79d14e821b3a src/list.c --- a/src/list.c Sat Apr 16 20:17:01 2022 +0200 +++ b/src/list.c Sat Apr 16 20:44:47 2022 +0200 @@ -57,3 +57,16 @@ return list->list_destructor(list); } } + +void cxListMemoryMgmt( + CxList *list, + cx_destructor_func list_destructor, + cx_destructor_func content_destructor, + bool list_autofree, + bool content_autofree +) { + if (list_destructor != NULL) list->list_destructor = list_destructor; + list->content_destructor = content_destructor; + list->autofree = list_autofree; + list->autofree_contents = content_autofree; +}