httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <>
Subject Re: Regexp mess?
Date Wed, 09 May 2007 12:09:24 GMT
On May 8, 2007, at 7:20 PM, Tim Bray wrote:

> Why are the regex-related routine declarations splashed across  
> httpd.h and ap_regex.h?  And why are there two versions of regcomp,  
> only one of which takes a pool for allocation?

Too much history and a bit of indecisiveness.  We originally used a
different regex library that lacked some of the features in PCRE.
After migrating to PCRE, we needed just enough of the library to
define a pool-capable regcomp.  The declarations are a mess because
of the pseudo portable way in which various broken implementations
of regex libraries exist on various operating systems (e.g., Solaris)
and the various ways in which header files are included on those
systems.  Finally, long after we had to add that stuff, PCRE became
popular enough on its own to justify removing it from the core
server and simply making it a dependency, but that kind of change
will have to wait until the next major release.

> And why are they ap_ instead of apr_?

The ap_ prefix is what we use for public functions in Apache httpd.
The apr_ prefix was created for the APR project, which adopted most
(but not all) of the original httpd public functions.

> And why is it so hard to find any documentation on them?  Fortunately
> the code is pretty easy to read... -Tim

Thanks for volunteering. ;-)


View raw message