apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: current dbd initiatives
Date Sun, 11 Jun 2006 06:48:08 GMT
On Fri, 2006-06-09 at 22:28 -0400, Chris Darroch wrote:

>    (I'm actually a little surprised by the use of va_arg() in
> the other drivers and also in apr_brigade.c, where it seems like a
> NULL return is expected after iterating past the last argument.
> I didn't know va_arg() would do that ... the Linux man page says
> "random errors will occur" after the last argument.  Does anyone
> know which is correct?)

As I understand it, PostgreSQL and SQLite3 drivers expect NULL to be the
last value in the the va_list args (for compatibility, I guess other
drivers should expect the same). This value should be placed there by
the caller. The drivers don't take into account any number figured out
in _prepare() as the number of values they should expect in
pvquery/pvselect. The behaviour of va_arg() shouldn't have anything to
do with this.

-- 
Bojan


Mime
View raw message