summaryrefslogtreecommitdiff
path: root/source/fitz/hash.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-02-17 15:45:22 +0100
committerTor Andersson <tor.andersson@artifex.com>2014-02-17 16:36:06 +0100
commit41084f0023df8706fadfa2e2b6373ec03a7c7ca4 (patch)
tree0e2f4be0832654f5b5d3c8411822ab9de50a5abb /source/fitz/hash.c
parent3f0004acad7da3fcac4687844cb36e2b1ee855b0 (diff)
downloadmupdf-41084f0023df8706fadfa2e2b6373ec03a7c7ca4.tar.xz
Add const to colorspace source arguments and dependencies.
Diffstat (limited to 'source/fitz/hash.c')
-rw-r--r--source/fitz/hash.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/fitz/hash.c b/source/fitz/hash.c
index 624cc305..708d72f2 100644
--- a/source/fitz/hash.c
+++ b/source/fitz/hash.c
@@ -26,7 +26,7 @@ struct fz_hash_table_s
fz_hash_entry *ents;
};
-static unsigned hash(unsigned char *s, int len)
+static unsigned hash(const unsigned char *s, int len)
{
unsigned val = 0;
int i;
@@ -101,7 +101,7 @@ fz_free_hash(fz_context *ctx, fz_hash_table *table)
}
static void *
-do_hash_insert(fz_context *ctx, fz_hash_table *table, void *key, void *val, unsigned *pos_ptr)
+do_hash_insert(fz_context *ctx, fz_hash_table *table, const void *key, void *val, unsigned *pos_ptr)
{
fz_hash_entry *ents;
unsigned size;
@@ -199,7 +199,7 @@ fz_resize_hash(fz_context *ctx, fz_hash_table *table, int newsize)
}
void *
-fz_hash_find(fz_context *ctx, fz_hash_table *table, void *key)
+fz_hash_find(fz_context *ctx, fz_hash_table *table, const void *key)
{
fz_hash_entry *ents = table->ents;
unsigned size = table->size;
@@ -221,7 +221,7 @@ fz_hash_find(fz_context *ctx, fz_hash_table *table, void *key)
}
void *
-fz_hash_insert(fz_context *ctx, fz_hash_table *table, void *key, void *val)
+fz_hash_insert(fz_context *ctx, fz_hash_table *table, const void *key, void *val)
{
if (table->load > table->size * 8 / 10)
{
@@ -232,7 +232,7 @@ fz_hash_insert(fz_context *ctx, fz_hash_table *table, void *key, void *val)
}
void *
-fz_hash_insert_with_pos(fz_context *ctx, fz_hash_table *table, void *key, void *val, unsigned *pos)
+fz_hash_insert_with_pos(fz_context *ctx, fz_hash_table *table, const void *key, void *val, unsigned *pos)
{
if (table->load > table->size * 8 / 10)
{
@@ -243,7 +243,7 @@ fz_hash_insert_with_pos(fz_context *ctx, fz_hash_table *table, void *key, void *
}
static void
-do_removal(fz_context *ctx, fz_hash_table *table, void *key, unsigned hole)
+do_removal(fz_context *ctx, fz_hash_table *table, const void *key, unsigned hole)
{
fz_hash_entry *ents = table->ents;
unsigned size = table->size;
@@ -279,7 +279,7 @@ do_removal(fz_context *ctx, fz_hash_table *table, void *key, unsigned hole)
}
void
-fz_hash_remove(fz_context *ctx, fz_hash_table *table, void *key)
+fz_hash_remove(fz_context *ctx, fz_hash_table *table, const void *key)
{
fz_hash_entry *ents = table->ents;
unsigned size = table->size;
@@ -309,7 +309,7 @@ fz_hash_remove(fz_context *ctx, fz_hash_table *table, void *key)
}
void
-fz_hash_remove_fast(fz_context *ctx, fz_hash_table *table, void *key, unsigned pos)
+fz_hash_remove_fast(fz_context *ctx, fz_hash_table *table, const void *key, unsigned pos)
{
fz_hash_entry *ents = table->ents;