summaryrefslogtreecommitdiff
path: root/xs_set.h
diff options
context:
space:
mode:
authorGravatar default2024-05-25 08:24:08 +0200
committerGravatar default2024-05-25 08:24:08 +0200
commita2920800007c291bdf2b5264622cbc713d4961ee (patch)
tree9fb1b2b89e0bfbb4b8bf1e85d840c8653e646bb7 /xs_set.h
parentAdded a 'title' to each list timeline. (diff)
downloadpenes-snac2-a2920800007c291bdf2b5264622cbc713d4961ee.tar.gz
penes-snac2-a2920800007c291bdf2b5264622cbc713d4961ee.tar.xz
penes-snac2-a2920800007c291bdf2b5264622cbc713d4961ee.zip
Backport from xs (fix regex.h compilation with tcc).
Diffstat (limited to 'xs_set.h')
-rw-r--r--xs_set.h5
1 files changed, 2 insertions, 3 deletions
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)
85{ 85{
86 /* is it 'full'? */ 86 /* is it 'full'? */
87 if (s->used >= s->elems / 2) { 87 if (s->used >= s->elems / 2) {
88 char *p;
89 const xs_val *v; 88 const xs_val *v;
90 89
91 /* expand! */ 90 /* expand! */
@@ -96,8 +95,8 @@ int xs_set_add(xs_set *s, const xs_val *data)
96 memset(s->hash, '\0', s->elems * sizeof(int)); 95 memset(s->hash, '\0', s->elems * sizeof(int));
97 96
98 /* add the list elements back */ 97 /* add the list elements back */
99 p = s->list; 98 int ct = 0;
100 while (xs_list_iter(&p, &v)) 99 while (xs_list_next(s->list, &v, &ct))
101 _store_hash(s, v, v - s->list); 100 _store_hash(s, v, v - s->list);
102 } 101 }
103 102