httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <...@sunstarsys.com>
Subject naming conventions & data structures (was Re: proposed 2.0 features/layout)
Date Mon, 18 Feb 2002 19:18:16 GMT
Stas Bekman <stas@stason.org> writes:

> > The current header files are inconsistent and have
> > too much cruft.  Although I prefer using a common
> > naming convention for both macros and functions within
> > header files, I could live with adopting a different
> > scheme for macros.  But the current .h files are not
> > consistent in this regard, and IMO that needs to change.
> 
> 
> + for common naming convention.

OK- some clarification on this: macros that have function-call
semantics (i.e. the args appear only once in the definition)
should be lower-case;  macros that may not be safe, like say

  #define apreq_MAX(a,b) ( (a) < (b) ? (b) : (a) )

MUST have (some) upper-case letters.

Another issue I think we should address is what sort of
data structures we'll use to hold the param's, cookie's,
and upload's.  In (the still-pending-Jim's release of) 1.0,
we use apache arrays and tables, and a simple home-grown
linked list for uploads.

For 2.0, I'm leaning *against* using ap_hash because it doesn't
seem to support multivalued keys as well as apache 1.x tables 
do (tables are implemented as a special kind of apache array;
the hash-like iterface for an apache table is just a ruse.)

IOW, if we decide on using a real hash, it probably should be 
list-valued, and I think that means we'll need to roll-our-own
version of ap_hash.  IMO it will be simpler to just use a linked 
list (a'la ap_ring.h) as the underlying structure for everything, 
and just superimpose a hash-like interface on top of it.

Thoughts?

-- 
Joe Schaefer

Mime
View raw message