From 5a21ba7fa52434ea1d6d27d2116dc6d05e61da98 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sun, 23 Dec 2012 20:30:46 +0100 Subject: [PATCH] HASH: make params const which don't need writing. --- libcitadel/lib/hash.c | 4 ++-- libcitadel/lib/libcitadel.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libcitadel/lib/hash.c b/libcitadel/lib/hash.c index 740c0dd61..38d780ed4 100644 --- a/libcitadel/lib/hash.c +++ b/libcitadel/lib/hash.c @@ -788,7 +788,7 @@ int GetHashKeys(HashList *Hash, char ***List) * step-raster is provided. * @return the hash iterator */ -HashPos *GetNewHashPos(HashList *Hash, int StepWidth) +HashPos *GetNewHashPos(const HashList *Hash, int StepWidth) { HashPos *Ret; @@ -940,7 +940,7 @@ void DeleteHashPos(HashPos **DelMe) * @param Data returns the Data found at HashPos * @return whether the item was found or not. */ -int GetNextHashPos(HashList *Hash, HashPos *At, long *HKLen, const char **HashKey, void **Data) +int GetNextHashPos(const HashList *Hash, HashPos *At, long *HKLen, const char **HashKey, void **Data) { long PayloadPos; diff --git a/libcitadel/lib/libcitadel.h b/libcitadel/lib/libcitadel.h index d842c25af..3b478b987 100644 --- a/libcitadel/lib/libcitadel.h +++ b/libcitadel/lib/libcitadel.h @@ -512,14 +512,14 @@ int GetKey(HashList *Hash, char *HKey, long HKLen, void **Data); int GetHashKeys(HashList *Hash, char ***List); int dbg_PrintHash(HashList *Hash, PrintHashContent first, PrintHashContent Second); int PrintHash(HashList *Hash, TransitionFunc Trans, PrintHashDataFunc PrintEntry); -HashPos *GetNewHashPos(HashList *Hash, int StepWidth); +HashPos *GetNewHashPos(const HashList *Hash, int StepWidth); int GetHashPosFromKey(HashList *Hash, const char *HKey, long HKLen, HashPos *At); int DeleteEntryFromHash(HashList *Hash, HashPos *At); int GetHashPosCounter(HashList *Hash, HashPos *At); void DeleteHashPos(HashPos **DelMe); int NextHashPos(HashList *Hash, HashPos *At); int GetHashPos(HashList *Hash, HashPos *At, long *HKLen, const char **HashKey, void **Data); -int GetNextHashPos(HashList *Hash, HashPos *At, long *HKLen, const char **HashKey, void **Data); +int GetNextHashPos(const HashList *Hash, HashPos *At, long *HKLen, const char **HashKey, void **Data); int GetHashAt(HashList *Hash,long At, long *HKLen, const char **HashKey, void **Data); void SortByHashKey(HashList *Hash, int Order); void SortByHashKeyStr(HashList *Hash); -- 2.30.2