summaryrefslogtreecommitdiff
path: root/xs_set.h
diff options
context:
space:
mode:
authorGravatar default2022-10-08 07:00:05 +0200
committerGravatar default2022-10-08 07:00:05 +0200
commit0f4779e2a095b72b7ec7fc0f2abe2cc57f152b76 (patch)
treed9b945a8c84ba1441ad1563a78259e6ae95e4c1a /xs_set.h
parentMore emoticons. (diff)
downloadpenes-snac2-0f4779e2a095b72b7ec7fc0f2abe2cc57f152b76.tar.gz
penes-snac2-0f4779e2a095b72b7ec7fc0f2abe2cc57f152b76.tar.xz
penes-snac2-0f4779e2a095b72b7ec7fc0f2abe2cc57f152b76.zip
Backport from xs.
Diffstat (limited to '')
-rw-r--r--xs_set.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/xs_set.h b/xs_set.h
index 7d7a762..2beb454 100644
--- a/xs_set.h
+++ b/xs_set.h
@@ -13,7 +13,7 @@ typedef struct _xs_set {
13 13
14xs_set *xs_set_new(int elems); 14xs_set *xs_set_new(int elems);
15void xs_set_free(xs_set *s); 15void xs_set_free(xs_set *s);
16int xs_set_add(xs_set *s, char *data); 16int xs_set_add(xs_set *s, const char *data);
17 17
18 18
19#ifdef XS_IMPLEMENTATION 19#ifdef XS_IMPLEMENTATION
@@ -40,7 +40,7 @@ void xs_set_free(xs_set *s)
40} 40}
41 41
42 42
43unsigned int _xs_set_hash(char *data, int size) 43unsigned int _xs_set_hash(const char *data, int size)
44{ 44{
45 unsigned int hash = 0x666; 45 unsigned int hash = 0x666;
46 int n; 46 int n;
@@ -54,7 +54,7 @@ unsigned int _xs_set_hash(char *data, int size)
54} 54}
55 55
56 56
57int xs_set_add(xs_set *s, char *data) 57int xs_set_add(xs_set *s, const char *data)
58/* adds the data to the set */ 58/* adds the data to the set */
59/* returns: 1 if added, 0 if already there, -1 if it's full */ 59/* returns: 1 if added, 0 if already there, -1 if it's full */
60{ 60{