httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1039528 - in /httpd/httpd/trunk: include/ap_expr.h server/util_expr_eval.c
Date Fri, 26 Nov 2010 19:32:13 GMT
Author: sf
Date: Fri Nov 26 19:32:13 2010
New Revision: 1039528

URL: http://svn.apache.org/viewvc?rev=1039528&view=rev
Log:
Fix another Windows build issue: Add a wrapper around ap_run_expr_lookup with
the correct calling convention.

Modified:
    httpd/httpd/trunk/include/ap_expr.h
    httpd/httpd/trunk/server/util_expr_eval.c

Modified: httpd/httpd/trunk/include/ap_expr.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_expr.h?rev=1039528&r1=1039527&r2=1039528&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_expr.h (original)
+++ httpd/httpd/trunk/include/ap_expr.h Fri Nov 26 19:32:13 2010
@@ -121,14 +121,15 @@ typedef struct {
 
 
 /**
- * The parse can be extended with variable lookup, functions, and
+ * The parser can be extended with variable lookup, functions, and
  * and operators.
  *
  * During parsing, the parser calls the lookup function to resolve a
  * name into a function pointer and an opaque context for the function.
  *
- * The default lookup function is the hook 'ap_run_expr_lookup'.
- * Modules can use it to make functions and variables generally available.
+ * The default lookup function is the hook 'ap_expr_lookup_default' which just
+ * calls ap_expr_lookup_default. Modules can use it to make functions and
+ * variables generally available.
  *
  * An ap_expr consumer can also provide its own custom lookup function to
  * modify the set of variables and functions that are available. The custom
@@ -217,6 +218,12 @@ typedef struct {
  */
 typedef int (ap_expr_lookup_fn)(ap_expr_lookup_parms *parms);
 
+/** Default lookup function which just calls ap_run_expr_lookup().
+ *  ap_run_expr_lookup cannot be used directly because it has the wrong
+ *  calling convention under Windows.
+ */
+AP_DECLARE_NONSTD(int) ap_expr_lookup_default(ap_expr_lookup_parms *parms);
+
 AP_DECLARE_HOOK(int, expr_lookup, (ap_expr_lookup_parms *parms))
 
 /**

Modified: httpd/httpd/trunk/server/util_expr_eval.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_eval.c?rev=1039528&r1=1039527&r2=1039528&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_eval.c (original)
+++ httpd/httpd/trunk/server/util_expr_eval.c Fri Nov 26 19:32:13 2010
@@ -327,6 +327,10 @@ static int ssl_expr_eval_comp(ap_expr_ev
     }
 }
 
+AP_DECLARE_NONSTD(int) ap_expr_lookup_default(ap_expr_lookup_parms *parms)
+{
+    return ap_run_expr_lookup(parms);
+}
 
 AP_DECLARE(const char *) ap_expr_parse(apr_pool_t *pool, apr_pool_t *ptemp,
                                        ap_expr_info_t *info, const char *expr,
@@ -347,7 +351,7 @@ AP_DECLARE(const char *) ap_expr_parse(a
     ctx.scan_del    = '\0';
     ctx.scan_buf[0] = '\0';
     ctx.scan_ptr    = ctx.scan_buf;
-    ctx.lookup_fn   = lookup_fn ? lookup_fn : ap_run_expr_lookup;
+    ctx.lookup_fn   = lookup_fn ? lookup_fn : ap_expr_lookup_default;
 
 
     /*



Mime
View raw message