diff --git a/inc/cleri/kwcache.h b/inc/cleri/kwcache.h index d986b76..f796d4c 100644 --- a/inc/cleri/kwcache.h +++ b/inc/cleri/kwcache.h @@ -14,16 +14,9 @@ typedef struct cleri_parse_s cleri_parse_t; /* private functions */ uint8_t * cleri__kwcache_new(const char * str); ssize_t cleri__kwcache_match(cleri_parse_t * pr, const char * str); -static inline void cleri__kwcache_free(uint8_t * kwcache); +void cleri__kwcache_free(uint8_t * kwcache); -/* - * Destroy kwcache. (parsing NULL is allowed) - */ -static inline void cleri__kwcache_free(uint8_t * kwcache) -{ - free(kwcache); -} #endif /* CLERI_KWCACHE_H_ */ diff --git a/src/kwcache.c b/src/kwcache.c index 9557ffa..00d22e7 100644 --- a/src/kwcache.c +++ b/src/kwcache.c @@ -78,3 +78,11 @@ static void kwcache__kw_match( ? 0 : pcre2_get_ovector_pointer(pr->match_data)[1]; } + +/* + * Destroy kwcache. (parsing NULL is allowed) + */ +void cleri__kwcache_free(uint8_t * kwcache) +{ + free(kwcache); +} \ No newline at end of file diff --git a/src/parse.c b/src/parse.c index bfc21d8..0914434 100644 --- a/src/parse.c +++ b/src/parse.c @@ -117,7 +117,7 @@ cleri_parse_t * cleri_parse2( void cleri_parse_free(cleri_parse_t * pr) { cleri__node_free(pr->tree); - cleri__kwcache_free(pr->kwcache); + free(pr->kwcache); if (pr->expecting != NULL) { cleri__expecting_free(pr->expecting);