diff options
| author | 2024-05-25 08:24:08 +0200 | |
|---|---|---|
| committer | 2024-05-25 08:24:08 +0200 | |
| commit | a2920800007c291bdf2b5264622cbc713d4961ee (patch) | |
| tree | 9fb1b2b89e0bfbb4b8bf1e85d840c8653e646bb7 /xs_set.h | |
| parent | Added a 'title' to each list timeline. (diff) | |
| download | snac2-a2920800007c291bdf2b5264622cbc713d4961ee.tar.gz snac2-a2920800007c291bdf2b5264622cbc713d4961ee.tar.xz snac2-a2920800007c291bdf2b5264622cbc713d4961ee.zip | |
Backport from xs (fix regex.h compilation with tcc).
Diffstat (limited to 'xs_set.h')
| -rw-r--r-- | xs_set.h | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -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 | ||