apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: apr_gethostname()
Date Fri, 16 Mar 2001 15:07:08 GMT
On Thu, 15 Mar 2001, Doug MacEachern wrote:

> On Thu, 15 Mar 2001 rbb@covalent.net wrote:
>
> > Yes.  All APR functions must have acess to a pool.  Imagine a platform
> > that requires we allocate memory for gethostname before we call the system
> > call.  If we don't pass the pool, we can't allocate the memory.  We are
> > trying to be future proof, which may be stupid, but that was part of the
> > original design.
>
> ok, this makes sense.  but i think you mean 'Most' not 'All' APR functions :)

The goal was all, but obviously we made some exceptions.  Any function
that works on the pool internals can't have access to a pool, because they
are working on the internals.  Any time function doesn't get a pool,
because the time type is a 64-bit integer, and any function moved down
from Apache doesn't follow this model.

Also, it is important to note that APR-utils doesn't have this design
goal, just APR itself.  APR-utils has a different goal than APR.  Because
APR-utils is supposed to use APR to do everything non-portable, we can say
with almost 100% accuracy which functions do and do not require a pool.

Ryan



Mime
View raw message