Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 54131 invoked from network); 9 Aug 2005 21:47:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Aug 2005 21:47:07 -0000 Received: (qmail 88360 invoked by uid 500); 9 Aug 2005 21:47:05 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 88312 invoked by uid 500); 9 Aug 2005 21:47:05 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 88299 invoked by uid 99); 9 Aug 2005 21:47:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2005 14:47:05 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [209.68.5.15] (HELO relay01.pair.com) (209.68.5.15) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 09 Aug 2005 14:47:26 -0700 Received: (qmail 57076 invoked from network); 9 Aug 2005 21:47:00 -0000 Received: from unknown (HELO ?10.0.100.15?) (unknown) by unknown with SMTP; 9 Aug 2005 21:47:00 -0000 X-pair-Authenticated: 206.80.1.253 Message-ID: <42F92276.1080705@electricjellyfish.net> Date: Tue, 09 Aug 2005 14:39:02 -0700 From: Garrett Rooney User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nick Kew CC: dev@apr.apache.org Subject: Re: apr_dbd References: <42F0F44F.9010100@webthing.com> <200508092102.37286.nick@webthing.com> <42F91320.6090007@electricjellyfish.net> <200508092227.44493.nick@webthing.com> In-Reply-To: <200508092227.44493.nick@webthing.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Nick Kew wrote: > On Tuesday 09 August 2005 21:33, Garrett Rooney wrote: > >>Nick Kew wrote: >> >>>Anyway, as I said, a placeholder now fixes that. >> >>Out of curiosity, is there any reason we can't just forward declare the >>struct and access the internals via some accessor functions? > > > Hmmm, fair point. > > There's one definite stumbling block there: the varargs APIs. > Can the vararg functions (specifically, the pvquery and pvselect > functions) be expressed as apr_dbd #defines, like the rest of > the calls? Anyone? Why does that matter? My suggestion doesn't involve any wrapper defines, just functions... in apr_dbd.h: typedef struct apr_dbd_driver_t apr_dbd_driver_t; apr_status_t apr_dbd_func_that_takes_varargs(apr_dbd_driver_t *d, ...); in driver.c struct apr_dbd_driver_t { /* stuff */ }; apr_status_t apr_dbd_func_that_takes_varargs(apr_dbd_driver_t *d, ...) { // turn ... into va_list return d->func(my_va_list); } I don't see the need for the macros at all... -garrett