]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Make Dictionary keys const everywhere.
authorJilles Tjoelker <redacted>
Tue, 8 Apr 2008 17:52:02 +0000 (19:52 +0200)
committerJilles Tjoelker <redacted>
Tue, 8 Apr 2008 17:52:02 +0000 (19:52 +0200)
include/irc_dictionary.h
src/irc_dictionary.c

index 0dac5456ce7118f87cda3057614bbbcbef0a11d9..5d762848d6a6e9cac62f36edcc4a02e5354be6eb 100644 (file)
@@ -33,7 +33,7 @@ struct DictionaryElement
 {
        struct DictionaryElement *left, *right, *prev, *next;
        void *data;
-       char *key;
+       const char *key;
        int position;
 };
 
@@ -133,7 +133,7 @@ extern void irc_dictionary_foreach_next(struct Dictionary *dtree,
 /*
  * irc_dictionary_add() adds a key->value entry to the dictionary tree.
  */
-extern struct DictionaryElement *irc_dictionary_add(struct Dictionary *dtree, char *key, void *data);
+extern struct DictionaryElement *irc_dictionary_add(struct Dictionary *dtree, const char *key, void *data);
 
 /*
  * irc_dictionary_find() returns a struct DictionaryElement container from a dtree for key 'key'.
index a99dede824106eff3432f07252ac0ea93ccf65f3..bf9409b80f7efad4c33a96a0b1298cde5f7481ec 100644 (file)
@@ -704,7 +704,7 @@ struct DictionaryElement *irc_dictionary_find(struct Dictionary *dict, const cha
  * Side Effects:
  *     - data is inserted into the DTree.
  */
-struct DictionaryElement *irc_dictionary_add(struct Dictionary *dict, char *key, void *data)
+struct DictionaryElement *irc_dictionary_add(struct Dictionary *dict, const char *key, void *data)
 {
        struct DictionaryElement *delem;