]> git.ozlabs.org Git - ccan/blobdiff - ccan/ciniparser/dictionary.c
base64: fix for unsigned chars (e.g. ARM).
[ccan] / ccan / ciniparser / dictionary.c
index c76eae3e875b4f4e7208825ee895ea4d39e6c0fb..19dd6411cc9cceb3cabe311a079352f0836e74ed 100644 (file)
@@ -33,7 +33,7 @@
  *
  * This module implements a simple dictionary object, i.e. a list
  * of string/string associations. This object is useful to store e.g.
- * informations retrieved from a configuration file (ini files).
+ * information retrieved from a configuration file (ini files).
  */
 
 #include "dictionary.h"
@@ -72,7 +72,7 @@ static void *mem_double(void *ptr, int size)
 
 /* The remaining exposed functions are documented in dictionary.h */
 
-unsigned dictionary_hash(char *key)
+unsigned dictionary_hash(const char *key)
 {
        int len;
        unsigned hash;
@@ -126,7 +126,7 @@ void dictionary_del(dictionary *d)
        return;
 }
 
-char *dictionary_get(dictionary *d, char *key, char *def)
+char *dictionary_get(dictionary *d, const char *key, char *def)
 {
        unsigned hash;
        int i;
@@ -146,7 +146,7 @@ char *dictionary_get(dictionary *d, char *key, char *def)
        return def;
 }
 
-int dictionary_set(dictionary *d, char *key, char *val)
+int dictionary_set(dictionary *d, const char *key, char *val)
 {
        int i;
        unsigned hash;
@@ -206,7 +206,7 @@ int dictionary_set(dictionary *d, char *key, char *val)
        return 0;
 }
 
-void dictionary_unset(dictionary *d, char *key)
+void dictionary_unset(dictionary *d, const char *key)
 {
        unsigned hash;
        int i;