httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bennett, Tony - CNF" <Bennett.T...@cnf.com>
Subject RE: ap_max_requests_per_child isn't part of the API, is it?
Date Sat, 28 Jun 2003 19:07:59 GMT
Jeff,

You referred to "formal definition of our API"

Is it documented somewhere?

-tony

-----Original Message-----
From: Jeff Trawick [mailto:trawick@attglobal.net] 
Sent: Saturday, June 28, 2003 5:25 AM
To: dev@httpd.apache.org
Subject: Re: ap_max_requests_per_child isn't part of the API, is it?


Jeff Trawick wrote:
> Some level of mod_php (presumably recent) won't load with Apache 2 on
> AIX, and the reason is that the decl of that variable in mpm_common.h 
> isn't formally exported (AP_DECLARE_DATA).  PHP should be using 
> ap_mpm_query(), right?
> 
> See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21046

Can anybody agree that something like this is is part of the formal 
definition of our API?

"Apache header files contain declarations for a number of variables and 
functions.  Many of these are part of the API, while some of these are 
simply necessary for the division of the Apache implementation across 
many source files.

Any such variables that are considered part of the API are declared with 
the AP_DECLARE_DATA qualifier.  Here is an example from scoreboard.h:

AP_DECLARE_DATA extern scoreboard *ap_scoreboard_image;

Any such functions that are considered part of the API are declared with 
AP_DECLARE() or AP_DECLARE_NONSTD().  Examples include:

AP_DECLARE(void) ap_add_common_vars(request_rec *r);
AP_DECLARE_NONSTD(int) ap_rvputs(request_rec *r,...);

In addition, hooks are declared with AP_DECLARE_HOOK() or 
APR_DECLARE_EXTERNAL_HOOK().

If the declaration of a variable or function does not include these 
special qualifiers, it is not part of the API, and beyond the fact that 
it is not intended for module use, modules will not be able to access 
the variable or function on all platforms, leading to obscure failures 
for the users of such modules."

Mime
View raw message