httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <>
Subject ap_expr.h interface review
Date Thu, 11 Dec 2008 16:05:18 GMT
typedef enum {
} token_type_t;
} token_t;
} backref_t;

... all lack namespace-safety.

as do:

typedef const char *(*string_func_t)(request_rec*, const char*);
typedef int (*opt_func_t)(request_rec*, ap_parse_node_t*, string_func_t);

which are also undocumented and lacking parameter names.  What should 
such callbacks do/return?

AP_DECLARE(ap_parse_node_t*) ap_expr_parse(apr_pool_t *pool, const char *expr,
                                           int *was_error);

the "was_error" parameter seems to be redundant with the function 
returning NULL to indicate error?

The grammar of the expression being parsed is undocumented.  (well, I 
could guess that it might happen to match the grammar documented in the 
mod_include docs, but could everybody guess that?)

The purpose of the the *_func_t callbacks is pretty unclear without 
reference to the grammar.

The naming of the "TOKEN_ACCESS" constant seems to be a throwback to the 
use of this API in mod_include?

AP_DECLARE(apr_status_t) ap_expr_init(apr_pool_t *pool);

this is a purely internal interface so needn't be exposed to modules 

Regards, Joe

View raw message