mirror of
https://github.com/matrix-construct/construct
synced 2024-11-20 08:51:18 +01:00
Make Dictionary keys const everywhere.
This commit is contained in:
parent
ec40aa0d15
commit
6db4fb0a9b
2 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ struct DictionaryElement
|
||||||
{
|
{
|
||||||
struct DictionaryElement *left, *right, *prev, *next;
|
struct DictionaryElement *left, *right, *prev, *next;
|
||||||
void *data;
|
void *data;
|
||||||
char *key;
|
const char *key;
|
||||||
int position;
|
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.
|
* 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'.
|
* irc_dictionary_find() returns a struct DictionaryElement container from a dtree for key 'key'.
|
||||||
|
|
|
@ -704,7 +704,7 @@ struct DictionaryElement *irc_dictionary_find(struct Dictionary *dict, const cha
|
||||||
* Side Effects:
|
* Side Effects:
|
||||||
* - data is inserted into the DTree.
|
* - 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;
|
struct DictionaryElement *delem;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue