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:
parent
59031adba6
commit
5ed58df9f6
@ -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))
|
||||
{
|
||||
|
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user