Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
keywordset.h: Add keywordset_free_byref
Add function keywordset_free_byref to be used with `__attribute__
((cleanup))`.
  • Loading branch information
donald committed Apr 19, 2020
1 parent 19d0aac commit 62c4f57
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions keywordset.h
Expand Up @@ -9,4 +9,6 @@ int keywordset_ismember(struct keywordset *kws, char *name);
void keywordset_purge(struct keywordset *kws);
void keywordset_free(struct keywordset *kws);

__attribute__ ((unused)) static void keywordset_free_byref (struct keywordset **kws) { keywordset_free(*kws); }

#endif

0 comments on commit 62c4f57

Please sign in to comment.