/**
- * 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
*/
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))
/**
}
}
+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,
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;
/*