From: Jeff Trawick Date: Fri, 18 Mar 2011 17:13:21 +0000 (+0000) Subject: transformation X-Git-Tag: 2.3.12~204 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66c61f70d559e8b91173093c8854a5372cb3b734;p=apache transformation git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082976 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/developer/new_api_2_4.html.en b/docs/manual/developer/new_api_2_4.html.en index 982cce8e92..3ecd948f5c 100644 --- a/docs/manual/developer/new_api_2_4.html.en +++ b/docs/manual/developer/new_api_2_4.html.en @@ -278,14 +278,32 @@

The number of parameters of the ap_log_* functions and the definition of APLOG_MARK has changed. Normally, the change - is completely transparent. However, if a module implements wrapper - functions for ap_log_* and uses APLOG_MARK - when calling these wrappers, some adjustments are necessary. - The easiest way is for the module to define and use a different macro - that expands to the parameters required by the log wrapper functions. - APLOG_MARK should only be used when calling - ap_log_* without additional wrappers. In this way, the - code will remain compatible with HTTPD 2.0 and 2.2.

+ is completely transparent. However, changes are required if a + module uses APLOG_MARK as a parameter to its own functions + or if a module calls ap_log_* without passing + APLOG_MARK. A module which uses wrappers + around ap_log_* typically uses both of these constructs.

+ +

The easiest way to change code which passes APLOG_MARK to + its own functions is to define and use a different macro that expands to + the parameters required by those functions, as APLOG_MARK + should only be used when calling ap_log_* + directly. In this way, the code will remain compatible with HTTPD 2.0 + and 2.2.

+ +

Code which calls ap_log_* without passing + APLOG_MARK will necessarily differ between 2.4 and earlier + releases, as 2.4 requires a new third argument, + APLOG_MODULE_INDEX.

+ +

+ /* code for httpd 2.0/2.2 */
+ ap_log_perror(file, line, APLOG_ERR, 0, p, "Failed to allocate dynamic lock structure");
+
+ /* code for httpd 2.4 */
+ ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, 0, p, "Failed to allocate dynamic lock structure");
+
+

A server_rec pointer must be passed to ap_log_error() when called after startup. This