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

Re: svn commit: r28024 - branches/issue-2897/subversion/libsvn_fs_util

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-11-28 00:16:25 CET

On Nov 26, 2007 12:36 PM, David Glasser <glasser@davidglasser.net> wrote:
> On Nov 26, 2007 10:01 AM, Daniel Rall <dlr@collab.net> wrote:
> > On Mon, 26 Nov 2007, kameshj@tigris.org wrote:
> > ...
> > > --- branches/issue-2897/subversion/libsvn_fs_util/mergeinfo-sqlite-index.c (original)
> > > +++ branches/issue-2897/subversion/libsvn_fs_util/mergeinfo-sqlite-index.c Mon Nov 26 04:59:33 2007
> > > @@ -836,6 +836,10 @@
> > > SVN_FS__SQLITE_ERR(sqlite3_bind_int64(stmt, 2, min_commit_rev+1), db);
> > > SVN_FS__SQLITE_ERR(sqlite3_bind_int64(stmt, 3, max_commit_rev), db);
> > > sqlite_result = sqlite3_step(stmt);
> > > +
> > > + if (!(sqlite_result == SQLITE_ROW || sqlite_result == SQLITE_DONE))
> > > + return svn_fs__sqlite_stmt_error(stmt);
> > > +
> >
> > We perform this same check 3 times. How about a macro, something
> > like:
> >
> > #define SQLITE_CURSOR_STEP_OK(sqlite_result) \
> > (sqlite_result == SQLITE_ROW || sqlite_result == SQLITE_DONE)
> >
> > That'd be a lot more comprehensible, too.
>
> There's already a svn_fs__sqlite_step_done which is "run sqlite3_step
> and cry if it isn't ROW or DONE"; perhaps add a
> svn_fs__sqlite_step_row_or_done.

Added svn_fs__sqlite_step in r28091. I will make the code currently
on trunk use it; hopefully I'm not making your branch-upkeep work too
miserable.

--dave

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 28 00:16:38 2007

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.