# HG changeset patch # User Mike Becker # Date 1736082210 -3600 # Node ID 89ec23988b8813532a0f702ce6b3d1f58a79fb1c # Parent c3bde8ff1c0b90f900d01756953e3f0d6bae0f7c free functions should not be inline in release mode - relates to #541 diff -r c3bde8ff1c0b -r 89ec23988b88 check-all.sh --- a/check-all.sh Sun Jan 05 13:54:09 2025 +0100 +++ b/check-all.sh Sun Jan 05 14:03:30 2025 +0100 @@ -36,6 +36,10 @@ printf "Check w/o szmul builtin (c++)... " perform_check_cxx +printf "Check release config... " +./configure --release > /dev/null +perform_check + printf "Check gcc C23 preview... " CC=gcc CFLAGS=-std=c23 ./configure --debug > /dev/null perform_check diff -r c3bde8ff1c0b -r 89ec23988b88 src/cx/list.h --- a/src/cx/list.h Sun Jan 05 13:54:09 2025 +0100 +++ b/src/cx/list.h Sun Jan 05 14:03:30 2025 +0100 @@ -885,10 +885,7 @@ * * @param list the list which shall be freed */ -static inline void cxListFree(CxList *list) { - if (list == NULL) return; - list->cl->deallocate(list); -} +void cxListFree(CxList *list); /** * A shared instance of an empty list. diff -r c3bde8ff1c0b -r 89ec23988b88 src/cx/map.h --- a/src/cx/map.h Sun Jan 05 13:54:09 2025 +0100 +++ b/src/cx/map.h Sun Jan 05 14:03:30 2025 +0100 @@ -210,10 +210,7 @@ * * @param map the map to be freed */ -static inline void cxMapFree(CxMap *map) { - if (map == NULL) return; - map->cl->deallocate(map); -} +void cxMapFree(CxMap *map); /** diff -r c3bde8ff1c0b -r 89ec23988b88 src/cx/tree.h --- a/src/cx/tree.h Sun Jan 05 13:54:09 2025 +0100 +++ b/src/cx/tree.h Sun Jan 05 14:03:30 2025 +0100 @@ -932,13 +932,7 @@ * * @param tree the tree to free */ -static inline void cxTreeFree(CxTree *tree) { - if (tree == NULL) return; - if (tree->root != NULL) { - cxTreeClear(tree); - } - cxFree(tree->allocator, tree); -} +void cxTreeFree(CxTree *tree); /** * Creates a new tree structure based on the specified layout. diff -r c3bde8ff1c0b -r 89ec23988b88 src/list.c --- a/src/list.c Sun Jan 05 13:54:09 2025 +0100 +++ b/src/list.c Sun Jan 05 14:03:30 2025 +0100 @@ -481,3 +481,8 @@ it.base.mutating = true; return it; } + +void cxListFree(CxList *list) { + if (list == NULL) return; + list->cl->deallocate(list); +} diff -r c3bde8ff1c0b -r 89ec23988b88 src/map.c --- a/src/map.c Sun Jan 05 13:54:09 2025 +0100 +++ b/src/map.c Sun Jan 05 14:03:30 2025 +0100 @@ -100,3 +100,8 @@ it.base.mutating = true; return it; } + +void cxMapFree(CxMap *map) { + if (map == NULL) return; + map->cl->deallocate(map); +} diff -r c3bde8ff1c0b -r 89ec23988b88 src/tree.c --- a/src/tree.c Sun Jan 05 13:54:09 2025 +0100 +++ b/src/tree.c Sun Jan 05 14:03:30 2025 +0100 @@ -844,6 +844,14 @@ return tree; } +void cxTreeFree(CxTree *tree) { + if (tree == NULL) return; + if (tree->root != NULL) { + cxTreeClear(tree); + } + cxFree(tree->allocator, tree); +} + CxTree *cxTreeCreateWrapped( const CxAllocator *allocator, void *root,