Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 87918 invoked from network); 11 Dec 2008 16:06:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Dec 2008 16:06:05 -0000 Received: (qmail 6544 invoked by uid 500); 11 Dec 2008 16:06:13 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 6478 invoked by uid 500); 11 Dec 2008 16:06:13 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 6457 invoked by uid 99); 11 Dec 2008 16:06:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2008 08:06:13 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jorton@redhat.com designates 66.187.237.31 as permitted sender) Received: from [66.187.237.31] (HELO mx2.redhat.com) (66.187.237.31) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2008 16:05:52 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mBBG5WRI007410 for ; Thu, 11 Dec 2008 11:05:32 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mBBG5VUQ022982 for ; Thu, 11 Dec 2008 11:05:31 -0500 Received: from turnip.manyfish.co.uk (vpn-12-206.rdu.redhat.com [10.11.12.206]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mBBG5Tsg013307 for ; Thu, 11 Dec 2008 11:05:30 -0500 Received: from jorton by turnip.manyfish.co.uk with local (Exim 4.69) (envelope-from ) id 1LAo2Q-0007Jy-Vc for dev@httpd.apache.org; Thu, 11 Dec 2008 16:05:18 +0000 Date: Thu, 11 Dec 2008 16:05:18 +0000 From: Joe Orton To: dev@httpd.apache.org Subject: ap_expr.h interface review Message-ID: <20081211160518.GA25382@redhat.com> Mail-Followup-To: dev@httpd.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Organization: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in UK and Wales under Company Registration No. 03798903 Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt Parson (USA), Charlie Peters (USA) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Virus-Checked: Checked by ClamAV on apache.org typedef enum { TOKEN_STRING, TOKEN_RE, TOKEN_AND, } 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 AFAICT. Regards, Joe