dev  

Re: Implementing apr_hash_do(vdo)

Garrett Rooney
Fri, 11 Jul 2008 06:50:17 -0700

On Fri, Jul 11, 2008 at 1:57 AM, Mladen Turk <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Unlike apr_table, apr_hash doesn't have iterator callback API.
> IMO this would be very useful function for hash usages where
> iterative operation on all table elements is required.
> Right now this is done via hash_first, hash_next, hash_this operation,
> and thats fine, but IMO apr_table_do like API would lower down
> the number of user repetitive code needed to accomplish such
> a common task.
>
> Any objections for implementing something like that?

FWIW, I believe Subversion has some similar code already:
http://svn.collab.net/repos/svn/trunk/subversion/include/svn_iter.h

Might be useful for API ideas.

-garrett