summaryrefslogtreecommitdiff
path: root/tables
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-04-19 08:54:48 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-04-19 08:54:48 +0000
commiteca5330568a95ca83f3d2817ff2e0178dd28a8f0 (patch)
tree325720be5bbb1a8b844dd5c0c8fface878844404 /tables
parentb76e4b70cb0e18fcc22bd5891e793edba44aa586 (diff)
downloadlibapr-eca5330568a95ca83f3d2817ff2e0178dd28a8f0.tar.gz
* tables/apr_hash.c (apr_hash_merge): Copy the hash_func.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65069 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tables')
-rw-r--r--tables/apr_hash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tables/apr_hash.c b/tables/apr_hash.c
index d7b73bdb5..c3f3240a3 100644
--- a/tables/apr_hash.c
+++ b/tables/apr_hash.c
@@ -172,7 +172,7 @@ static void expand_array(apr_hash_t *ht)
ht->max = new_max;
}
-unsigned int apr_hashfunc_default( const char *key, apr_ssize_t *klen)
+unsigned int apr_hashfunc_default(const char *key, apr_ssize_t *klen)
{
unsigned int hash = 0;
const unsigned char *p;
@@ -249,7 +249,7 @@ static apr_hash_entry_t **find_entry(apr_hash_t *ht,
apr_hash_entry_t **hep, *he;
unsigned int hash;
- hash = ht->hash_func( key, &klen );
+ hash = ht->hash_func(key, &klen);
/* scan linked list */
for (hep = &ht->array[hash & ht->max], he = *hep;
@@ -395,6 +395,7 @@ APR_DECLARE(apr_hash_t *) apr_hash_merge(apr_pool_t *p,
res = apr_palloc(p, sizeof(apr_hash_t));
res->pool = p;
+ res->hash_func = base->hash_func;
res->count = base->count;
res->max = (overlay->max > base->max) ? overlay->max : base->max;
if (base->count + overlay->count > res->max) {