mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 14:35:04 +00:00
Backport from xs.
This commit is contained in:
parent
f215c1a35b
commit
3699b61f08
2 changed files with 14 additions and 4 deletions
16
xs_set.h
16
xs_set.h
|
@ -32,11 +32,21 @@ void xs_set_init(xs_set *s)
|
|||
}
|
||||
|
||||
|
||||
void xs_set_free(xs_set *s)
|
||||
/* frees a set */
|
||||
d_char *xs_set_result(xs_set *s)
|
||||
/* returns the set as a list and frees it */
|
||||
{
|
||||
d_char *list = s->list;
|
||||
s->list = NULL;
|
||||
s->hash = xs_free(s->hash);
|
||||
s->list = xs_free(s->list);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
void xs_set_free(xs_set *s)
|
||||
/* frees a set, dropping the list */
|
||||
{
|
||||
free(xs_set_result(s));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
/* 2c01845d968c01c84aa52ff00ed029d9277c2d9c */
|
||||
/* e9effd101e5ad45cc4209759ae25e4a6de9259e8 */
|
||||
|
|
Loading…
Reference in a new issue