diff options
author | Joe Orton <jorton@apache.org> | 2004-04-19 08:54:48 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2004-04-19 08:54:48 +0000 |
commit | d8050b0f053971109190ee330aa2cf844944f59e (patch) | |
tree | 325720be5bbb1a8b844dd5c0c8fface878844404 /tables/apr_hash.c | |
parent | a2ecf7b0d590523550d1680ecceb42d6a5f54be5 (diff) | |
download | apr-d8050b0f053971109190ee330aa2cf844944f59e.tar.gz |
* tables/apr_hash.c (apr_hash_merge): Copy the hash_func.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65069 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tables/apr_hash.c')
-rw-r--r-- | tables/apr_hash.c | 5 |
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) { |