apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <i...@cnet.com>
Subject Re: apr_table_t (was: Re: Release time?)
Date Wed, 19 Sep 2001 21:38:32 GMT
On Wed, 2001-09-19 at 14:28, Justin Erenkrantz wrote:
> On Wed, Sep 19, 2001 at 12:25:36PM -0700, Brian Pane wrote:
> > The original approach that I posted was a traditional iterator object:
> > 
> >   typedef struct apr_table_iter_t apr_table_iter_t;
> >   apr_table_iter_t * apr_table_iter_make(apr_pool_t *p,
> >                                          const apr_table_t *t);
> > 
> >   apr_status_t apr_table_iter_next(apr_table_iter_t *iterator,
> >                                    const char **key,
> >                                    const char **value);
> > 
> > In my experience, this is an easy change to make, at least in the core
> > modules (I only had to change half a dozen places in httpd-2.0 to get
> > it to work.)
> > 
> > Does anybody have thoughts for or against this iterator API?
> 
> +1.  Accessing the structures directly goes against our philosophy.

Can we use the same API structure as the hash table?

	apr_table_index_t* apr_table_first( apr_pool_t*p, apr_table_t*t)
	apr_table_index_t* apr_table_next(apr_table_index_t*)
 	void apr_table_this(apr_table_index_t*,const char**key,const
			char**value)

http://docx.webperf.org/group__APR__Hash.html
> -- justin
-- 
Ian Holsman          IanH@cnet.com
Performance Measurement & Analysis
CNET Networks   -   (415) 364-8608


Mime
View raw message