-/* Copyright (C) 2003,2005 MORIOKA Tomohiko
+/* Copyright (C) 2003,2005,2006 MORIOKA Tomohiko
This file is part of the CONCORD Library.
The CONCORD Library is free software; you can redistribute it and/or
CONCORD_NAME_TABLE* concord_make_name_table (void);
void concord_destroy_name_table (CONCORD_NAME_TABLE* table);
int concord_name_table_put (CONCORD_NAME_TABLE* table,
- const unsigned char *key, void *value);
-void*
-concord_name_table_get (CONCORD_NAME_TABLE* table, const unsigned char *key);
+ const char *key, void *value);
+void* concord_name_table_get (CONCORD_NAME_TABLE* table, const char *key);
int concord_name_table_grow (CONCORD_NAME_TABLE* table);
#endif /* !_CONCORD_NAME_H */
-/* Copyright (C) 2003,2004,2005 MORIOKA Tomohiko
+/* Copyright (C) 2003,2004,2005,2006 MORIOKA Tomohiko
This file is part of the CONCORD Library.
The CONCORD Library is free software; you can redistribute it and/or
int
concord_name_table_put (CONCORD_NAME_TABLE* table,
- const unsigned char *key, void *value)
+ const char *key, void *value)
{
int i, index;
CONCORD_NAME_TABLE_ENTRY* entry;
if (table == NULL)
return -1;
- index = concord_hash_c_string (key) % table->size;
+ index = concord_hash_c_string ((unsigned char*)key) % table->size;
for (i = index; i < table->size; i++)
{
entry = &table->data[i];
}
void *
-concord_name_table_get (CONCORD_NAME_TABLE* table,
- const unsigned char *key)
+concord_name_table_get (CONCORD_NAME_TABLE* table, const char *key)
{
int i, index;
CONCORD_NAME_TABLE_ENTRY entry;
if (table == NULL)
return NULL;
- index = concord_hash_c_string (key) % table->size;
+ index = concord_hash_c_string ((unsigned char*)key) % table->size;
for (i = index; i < table->size; i++)
{
entry = table->data[i];