summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-08-08 03:26:25 +0000
committerDavid Robillard <d@drobilla.net>2014-08-08 03:26:25 +0000
commitce0ab9ef319383619ede0d53305b22b0ef1240b8 (patch)
treeee7c7a1aaedc17628eb888e2fe0e1837d1402241 /src
parent46e5b520df7f08edb96fb29e3775bccf3205d8f7 (diff)
downloadsord-ce0ab9ef319383619ede0d53305b22b0ef1240b8.tar.gz
sord-ce0ab9ef319383619ede0d53305b22b0ef1240b8.tar.bz2
sord-ce0ab9ef319383619ede0d53305b22b0ef1240b8.zip
Fix some const-correctness violations.
git-svn-id: http://svn.drobilla.net/sord/trunk@297 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src')
-rw-r--r--src/sord.c4
-rw-r--r--src/zix/hash.c8
-rw-r--r--src/zix/hash.h6
3 files changed, 9 insertions, 9 deletions
diff --git a/src/sord.c b/src/sord.c
index 59e25e9..9475fa2 100644
--- a/src/sord.c
+++ b/src/sord.c
@@ -199,9 +199,9 @@ sord_world_new(void)
}
static void
-free_node_entry(const void* value, void* user_data)
+free_node_entry(void* value, void* user_data)
{
- const SordNode* node = (const SordNode*)value;
+ SordNode* node = (SordNode*)value;
if (node->node.type == SERD_LITERAL) {
sord_node_free((SordWorld*)user_data, node->meta.lit.datatype);
}
diff --git a/src/zix/hash.c b/src/zix/hash.c
index b24ee78..655c5df 100644
--- a/src/zix/hash.c
+++ b/src/zix/hash.c
@@ -46,8 +46,8 @@ struct ZixHashImpl {
unsigned count;
};
-static inline const void*
-zix_hash_value(const ZixHashEntry* entry)
+static inline void*
+zix_hash_value(ZixHashEntry* entry)
{
return entry + 1;
}
@@ -214,13 +214,13 @@ zix_hash_remove(ZixHash* hash, const void* value)
}
ZIX_API void
-zix_hash_foreach(const ZixHash* hash,
+zix_hash_foreach(ZixHash* hash,
ZixHashVisitFunc f,
void* user_data)
{
for (unsigned b = 0; b < *hash->n_buckets; ++b) {
ZixHashEntry* bucket = hash->buckets[b];
- for (const ZixHashEntry* e = bucket; e; e = e->next) {
+ for (ZixHashEntry* e = bucket; e; e = e->next) {
f(zix_hash_value(e), user_data);
}
}
diff --git a/src/zix/hash.h b/src/zix/hash.h
index c992117..5b265ff 100644
--- a/src/zix/hash.h
+++ b/src/zix/hash.h
@@ -43,8 +43,8 @@ typedef uint32_t (*ZixHashFunc)(const void* value);
/**
Function to visit a hash element.
*/
-typedef void (*ZixHashVisitFunc)(const void* value,
- void* user_data);
+typedef void (*ZixHashVisitFunc)(void* value,
+ void* user_data);
/**
Create a new hash table.
@@ -124,7 +124,7 @@ zix_hash_find(const ZixHash* hash,
@param user_data The user_data parameter passed to @p f.
*/
ZIX_API void
-zix_hash_foreach(const ZixHash* hash,
+zix_hash_foreach(ZixHash* hash,
ZixHashVisitFunc f,
void* user_data);