[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r35658 - in trunk/subversion: include/private libsvn_subr

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 4 Feb 2009 04:21:13 +0100

This seems weird to spread the OUT values across the func return and a
parameter. In all other cases I can think of, we return both via the
parameters, and the function becomes void.

Thoughts?

Cheers,
-g

On Tue, Feb 3, 2009 at 22:49, Hyrum K. Wright <hyrum_at_hyrumwright.org> wrote:
> Author: hwright
> Date: Tue Feb 3 13:49:08 2009
> New Revision: 35658
>
> Log:
> Add a new sqlite API, for retrieving blob columns in a row.
>
> * subversion/libsvn_subr/sqlite.c
> * subversion/include/private/svn_sqlite.h
> (svn_sqlite__column_blob): New.
>
> Modified:
> trunk/subversion/include/private/svn_sqlite.h
> trunk/subversion/libsvn_subr/sqlite.c
>
> Modified: trunk/subversion/include/private/svn_sqlite.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/private/svn_sqlite.h?pathrev=35658&r1=35657&r2=35658
> ==============================================================================
> --- trunk/subversion/include/private/svn_sqlite.h Tue Feb 3 13:34:00 2009 (r35657)
> +++ trunk/subversion/include/private/svn_sqlite.h Tue Feb 3 13:49:08 2009 (r35658)
> @@ -129,6 +129,10 @@ svn_sqlite__bind_blob(svn_sqlite__stmt_t
> const void *val,
> apr_size_t len);
>
> +/* Wrapper around sqlite3_column_blob and sqlite3_column_bytes. */
> +const void *
> +svn_sqlite__column_blob(svn_sqlite__stmt_t *stmt, int column, apr_size_t *len);
> +
> /* Wrapper around sqlite3_column_text. */
> const char *
> svn_sqlite__column_text(svn_sqlite__stmt_t *stmt, int column);
>
> Modified: trunk/subversion/libsvn_subr/sqlite.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/sqlite.c?pathrev=35658&r1=35657&r2=35658
> ==============================================================================
> --- trunk/subversion/libsvn_subr/sqlite.c Tue Feb 3 13:34:00 2009 (r35657)
> +++ trunk/subversion/libsvn_subr/sqlite.c Tue Feb 3 13:49:08 2009 (r35658)
> @@ -289,6 +289,14 @@ svn_sqlite__bind_blob(svn_sqlite__stmt_t
> return SVN_NO_ERROR;
> }
>
> +const void *
> +svn_sqlite__column_blob(svn_sqlite__stmt_t *stmt, int column, apr_size_t *len)
> +{
> + const void *val = sqlite3_column_blob(stmt->s3stmt, column);
> + *len = sqlite3_column_bytes(stmt->s3stmt, column);
> + return val;
> +}
> +
> const char *
> svn_sqlite__column_text(svn_sqlite__stmt_t *stmt, int column)
> {
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1098742
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1099938
Received on 2009-02-04 04:21:44 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.