/usr/src/packages/BUILD/apr-1.3.8/include/apr_hash.h
Start iterating over the entries in a hash table.
- Parameters:
-
| 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. - Parameters:
-
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; } |