apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garrett Rooney <roo...@electricjellyfish.net>
Subject Re: svn commit: r231136 - in /apr/apr-util/trunk: dbd/apr_dbd.c dbd/apr_dbd_internal.h include/apr_dbd.h
Date Wed, 10 Aug 2005 16:39:46 GMT
niq@apache.org wrote:

> +    /** pvquery: query using a prepared statement + args
> +     *
> +     *  @param pool - working pool
> +     *  @param handle - the connection
> +     *  @param nrows - number of rows affected.
> +     *  @param statement - the prepared statement to execute
> +     *  @param ... - args to prepared statement
> +     *  @return 0 for success or error code
> +     */
> +    int (*pvquery)(apr_pool_t *pool, apr_dbd_t *handle, int *nrows,
> +                   apr_dbd_prepared_t *statement, ...);
> +
> +    /** pvselect: select using a prepared statement + args
> +     *
> +     *  @param pool - working pool
> +     *  @param handle - the connection
> +     *  @param res - pointer to query results.  May point to NULL on entry
> +     *  @param statement - the prepared statement to execute
> +     *  @param random - Whether to support random-access to results
> +     *  @param ... - args to prepared statement
> +     *  @return 0 for success or error code
> +     */
> +    int (*pvselect)(apr_pool_t *pool, apr_dbd_t *handle,
> +                    apr_dbd_results_t **res,
> +                    apr_dbd_prepared_t *statement, int random, ...);

Since when we call this in apr_dbd.c we pass a va_list to it, shouldn't 
we declare it as taking a va_list instead of ...?  That's what 
apr_pvsprintf does, for example.  I suspect if this is working then it's 
by accident, and I'm not sure we can depend on it working correctly on 
all platforms.

-garrett

Mime
View raw message