From a2920800007c291bdf2b5264622cbc713d4961ee Mon Sep 17 00:00:00 2001 From: default Date: Sat, 25 May 2024 08:24:08 +0200 Subject: Backport from xs (fix regex.h compilation with tcc). --- xs_set.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xs_set.h') diff --git a/xs_set.h b/xs_set.h index 12bac94..d320d34 100644 --- a/xs_set.h +++ b/xs_set.h @@ -85,7 +85,6 @@ int xs_set_add(xs_set *s, const xs_val *data) { /* is it 'full'? */ if (s->used >= s->elems / 2) { - char *p; const xs_val *v; /* expand! */ @@ -96,8 +95,8 @@ int xs_set_add(xs_set *s, const xs_val *data) memset(s->hash, '\0', s->elems * sizeof(int)); /* add the list elements back */ - p = s->list; - while (xs_list_iter(&p, &v)) + int ct = 0; + while (xs_list_next(s->list, &v, &ct)) _store_hash(s, v, v - s->list); } -- cgit v1.2.3