httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodent of Unusual Size <Ken.C...@Golux.Com>
Subject Re: Pools in apr types.
Date Thu, 13 May 1999 22:21:20 GMT
Ben Hyde wrote:
> 
> > 3)  All apr functions will be passed a context type.
> 
> I remain opposed to #3.  It is, and remains, a waste of
> cycles.  Possibly you'd be willing to change #3 to:
> 
> 3) All apr functions should have direct or indirect access
> to a pool/context.

If we had O-O class inheritance in ANSI C, the APR types
would be descendants of the 'apr_context_t' class and
this would happen automatically.  I don't know how to
reasonably accomplish the same thing in ANSI C, though.

How about:

1) All APR types will have a context pointer.
2) The context type will have a pointer for user data.
3) All APR types will have a pointer for user data.
4) All APR functions will be passed a pointer to either an
   APR type or a context.

That way there's user storage available at the cross-object
context level, and at the specific-object level, both accessible
from the object itself (foo->userdata, get_userdata(foo->context)).
Unfortunately the access methods can't be named the same..
-- 
#ken    P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>

Mime
View raw message