Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 13668 invoked from network); 9 Oct 2008 23:31:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2008 23:31:28 -0000 Received: (qmail 80155 invoked by uid 500); 9 Oct 2008 23:31:27 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 80131 invoked by uid 500); 9 Oct 2008 23:31:27 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 80119 invoked by uid 99); 9 Oct 2008 23:31:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Oct 2008 16:31:27 -0700 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=DNS_FROM_SECURITYSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.202.165.30] (HELO smtpauth19.prod.mesa1.secureserver.net) (64.202.165.30) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 09 Oct 2008 23:30:23 +0000 Received: (qmail 6736 invoked from network); 9 Oct 2008 23:30:49 -0000 Received: from unknown (76.252.112.72) by smtpauth19.prod.mesa1.secureserver.net (64.202.165.30) with ESMTP; 09 Oct 2008 23:30:48 -0000 Message-ID: <48EE9427.1000101@rowe-clan.net> Date: Thu, 09 Oct 2008 18:30:47 -0500 From: "William A. Rowe, Jr." User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Re: APR_DECLARE_OPTIONAL_FN and APR_RETRIEVE_OPTIONAL_FN References: <6456355d0810091618n6a98ec9dm706ecefd937e7ccd@mail.gmail.com> In-Reply-To: <6456355d0810091618n6a98ec9dm706ecefd937e7ccd@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Andrej van der Zee wrote: > > I was wondering what the purpose is of the macros > APR_DECLARE_OPTIONAL_FN and APR_RETRIEVE_OPTIONAL_FN. For example, in > mod_authn_dbd APR_RETRIEVE_OPTIONAL_FN is used to get a hold on the > functions ap_dbd_acquire and ap_dbd_prepare declared in in mod_dbd > with APR_DECLARE_OPTIONAL_FN. I could also directly invoke these > functions as they are declared in the header file mod_dbd.h and let > the loading of the module fail with an unresolved symbol if mod_dbd is > not loaded. What is the benefit for using those macros? Without them, it became impossible to build plugable frameworks without linking one module to another. Using this feature, it's possible to determine if mod_log_config is loaded and there is a function for publishing your config log extensions. And if mod_log_config is not present, your module can either hum along happily or decide to object violently. Your choice.