From: Cliff Woolley Date: Mon, 6 May 2002 01:10:24 +0000 (+0000) Subject: grr... mod_mem_cache didn't take kindly to that constness fix. So I'm X-Git-Tag: 2.0.37~510 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c637da7bd8bea034a3e81963631cf27645444003;p=apache grr... mod_mem_cache didn't take kindly to that constness fix. So I'm reverting it and will just have to live with the warning for now. FirstBill, what's The Right Way to fix this? Should we drop all the const qualifiers in there, or should cache_hash_set() return a const void * and mod_mem_cache should cast away the const, or what? git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94936 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/experimental/cache_hash.c b/modules/experimental/cache_hash.c index fe10d57519..f37863c495 100644 --- a/modules/experimental/cache_hash.c +++ b/modules/experimental/cache_hash.c @@ -285,10 +285,10 @@ CACHE_DECLARE(void *) cache_hash_get(cache_hash_t *ht, return NULL; } -CACHE_DECLARE(const void *) cache_hash_set(cache_hash_t *ht, - const void *key, - apr_ssize_t klen, - const void *val) +CACHE_DECLARE(void *) cache_hash_set(cache_hash_t *ht, + const void *key, + apr_ssize_t klen, + const void *val) { cache_hash_entry_t **hep, *tmp; const void *tval; diff --git a/modules/experimental/cache_hash.h b/modules/experimental/cache_hash.h index 6ed39b440d..0b06fdba81 100644 --- a/modules/experimental/cache_hash.h +++ b/modules/experimental/cache_hash.h @@ -115,8 +115,8 @@ CACHE_DECLARE(cache_hash_t *) cache_hash_make(apr_size_t size); * @remark If the value is NULL the hash entry is deleted. * @return The value of the deleted cache entry (so the caller can clean it up). */ -CACHE_DECLARE(const void *) cache_hash_set(cache_hash_t *ht, const void *key, - apr_ssize_t klen, const void *val); +CACHE_DECLARE(void *) cache_hash_set(cache_hash_t *ht, const void *key, + apr_ssize_t klen, const void *val); /** * Look up the value associated with a key in a hash table.