Constify arguments to Hash_FindEntry and Hash_CreateEntry.

This commit is contained in:
harti 2004-12-06 08:56:30 +00:00
parent cf54e99966
commit 6fb43802bf
2 changed files with 6 additions and 6 deletions

View File

@ -164,11 +164,11 @@ Hash_DeleteTable(Hash_Table *t)
*---------------------------------------------------------
*/
Hash_Entry *
Hash_FindEntry(Hash_Table *t, char *key)
Hash_FindEntry(const Hash_Table *t, const char *key)
{
Hash_Entry *e;
unsigned h;
char *p;
const char *p;
for (h = 0, p = key; *p;)
h = (h << 5) - h + *p++;
@ -198,11 +198,11 @@ Hash_FindEntry(Hash_Table *t, char *key)
*---------------------------------------------------------
*/
Hash_Entry *
Hash_CreateEntry(Hash_Table *t, char *key, Boolean *newPtr)
Hash_CreateEntry(Hash_Table *t, const char *key, Boolean *newPtr)
{
Hash_Entry *e;
unsigned int h;
char *p;
const char *p;
int keylen;
struct Hash_Entry **hp;

View File

@ -97,8 +97,8 @@ typedef struct Hash_Search {
void Hash_InitTable(Hash_Table *, int);
void Hash_DeleteTable(Hash_Table *);
Hash_Entry *Hash_FindEntry(Hash_Table *, char *);
Hash_Entry *Hash_CreateEntry(Hash_Table *, char *, Boolean *);
Hash_Entry *Hash_FindEntry(const Hash_Table *, const char *);
Hash_Entry *Hash_CreateEntry(Hash_Table *, const char *, Boolean *);
void Hash_DeleteEntry(Hash_Table *, Hash_Entry *);
Hash_Entry *Hash_EnumFirst(Hash_Table *, Hash_Search *);
Hash_Entry *Hash_EnumNext(Hash_Search *);