Make hashtable const correct.

Hashtable need not modify the filename when loading or saving
the hashtable; consequently the filename can be passed as const.
This commit is contained in:
Johan Wikman 2016-01-29 10:38:57 +02:00
parent 59031adba6
commit 5ed58df9f6
2 changed files with 4 additions and 4 deletions

View File

@ -711,7 +711,7 @@ hashtable_iterator_free(HASHITERATOR *iter)
* @return Number of entries written or -1 on error
*/
int
hashtable_save(HASHTABLE *table, char *filename,
hashtable_save(HASHTABLE *table, const char *filename,
int (*keywrite)(int, void*),
int (*valuewrite)(int, void*))
{
@ -771,7 +771,7 @@ hashtable_save(HASHTABLE *table, char *filename,
* @return Number of entries read or -1 on error
*/
int
hashtable_load(HASHTABLE *table, char *filename,
hashtable_load(HASHTABLE *table, const char *filename,
void *(*keyread)(int),
void *(*valueread)(int))
{

View File

@ -119,11 +119,11 @@ void hashtable_get_stats(void* hashtable,
int* nelems,
int* longest);
extern int hashtable_save(HASHTABLE *,
char *,
const char *filename,
int (*keywrite)(int, void*),
int (*valuewrite)(int, void*));
extern int hashtable_load(HASHTABLE *,
char *,
const char *filename,
void *(*keyread)(int),
void *(*valueread)(int));