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

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

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Wed, 28 Jan 2009 15:15:03 -0800

Greg Stein wrote:
> On Wed, Jan 28, 2009 at 20:48, Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
>> On Fri, 23 Jan 2009 12:39 -0800, "Hyrum K. Wright"
>> <hyrum_at_hyrumwright.org> wrote:
>>> Author: hwright
>>> Date: Fri Jan 23 12:39:08 2009
>>> New Revision: 35435
>>>
>>> Log:
>>> Update sqlite vararg binding to bind blobs.
>>>
>> ...
>>> Modified: trunk/subversion/libsvn_subr/sqlite.c
>>> URL:
>>> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/sqlite.c?pathrev=35435&r1=35434&r2=35435
>>> ==============================================================================
>>> --- trunk/subversion/libsvn_subr/sqlite.c Fri Jan 23 12:34:18 2009
>>> (r35434)
>>> +++ trunk/subversion/libsvn_subr/sqlite.c Fri Jan 23 12:39:08 2009
>>> (r35435)
>>> @@ -229,6 +229,12 @@ vbindf(svn_sqlite__stmt_t *stmt, const c
>>> va_arg(ap, apr_int64_t)));
>>> break;
>>>
>>> + case 'b':
>>> + SVN_ERR(svn_sqlite__bind_blob(stmt, count,
>>> + va_arg(ap, const void *),
>>> + va_arg(ap, apr_size_t)));
>>> + break;
>>> +
>> Can we use two va_arg() calls inside the function call? IIRC, the order
>> of evaluation of parameters to a function call is not defined...
>
> Agreed. I mentioned the same thing to Hyrum on IRC, but he either
> missed it, or labeled me a lunatic and ignored me. :-P

Let's just say I missed it and move along. :) btw, we aren't the first ones to
have this question:
http://stackoverflow.com/questions/376278/parameter-evaluation-order-before-a-function-calling-in-c

> (iow, I believe it would be safest to split those out into
> assignments, then passed as args)

Workin' on the patch now.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1065226
Received on 2009-01-29 00:15:19 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.