summaryrefslogtreecommitdiff
path: root/xs_set.h
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-10-08 07:00:05 +0200
committerdefault <nobody@localhost>2022-10-08 07:00:05 +0200
commit0f4779e2a095b72b7ec7fc0f2abe2cc57f152b76 (patch)
treed9b945a8c84ba1441ad1563a78259e6ae95e4c1a /xs_set.h
parent29a0b21929495b04e81085f1502a4498c728fb84 (diff)
Backport from xs.
Diffstat (limited to 'xs_set.h')
-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 {
xs_set *xs_set_new(int elems);
void xs_set_free(xs_set *s);
-int xs_set_add(xs_set *s, char *data);
+int xs_set_add(xs_set *s, const char *data);
#ifdef XS_IMPLEMENTATION
@@ -40,7 +40,7 @@ void xs_set_free(xs_set *s)
}
-unsigned int _xs_set_hash(char *data, int size)
+unsigned int _xs_set_hash(const char *data, int size)
{
unsigned int hash = 0x666;
int n;
@@ -54,7 +54,7 @@ unsigned int _xs_set_hash(char *data, int size)
}
-int xs_set_add(xs_set *s, char *data)
+int xs_set_add(xs_set *s, const char *data)
/* adds the data to the set */
/* returns: 1 if added, 0 if already there, -1 if it's full */
{