| p | The pool to allocate the apr_hash_index_t iterator. If this pool is NULL, then an internal, non-thread-safe iterator is used. | |
| ht | The hash table |
int sum_values(apr_pool_t *p, apr_hash_t *ht)
{
apr_hash_index_t *hi;
void *val;
int sum = 0;
for (hi = apr_hash_first(p, ht); hi; hi = apr_hash_next(hi)) {
apr_hash_this(hi, NULL, NULL, &val);
sum += *(int *)val;
}
return sum;
}
1.5.6