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

Re: svn_repos_trace_node_locations()

From: Branko ÄŒibej <brane_at_xbc.nu>
Date: 2004-06-11 11:06:47 CEST

Peter N. Lundblad wrote:

>Hi,
>
>I've reworked the first part of Shlomi's patch for the node-locations
>stuff. I don't think this part was reviewed before, so I could well have
>use for a pair of eyes.
>
>Note that more tests will be added later. Orignially, there was a command
>line app that just called the trace_locations function, and the tests were
>written in PYthon. I'm converting them to C and putting them in
>tests/libsvn_repos instead.
>
>
And one nit from me:

>+/* Compare revision numbers for sorting in decreasing order. */
>+static int
>+compare_revnums (const void *p_a, const void *p_b)
>+{
>+ svn_revnum_t a, b;
>+ a = *(svn_revnum_t *)p_a;
>+ b = *(svn_revnum_t *)p_b;
>+
>+ return (a < b) ? 1 : (a > b) ? -1 : 0;
>+}
>
>
Sigh, I'm so tired of seeing people write these verbose comparison
expressions... :-)

    return b - a;

-- 
Brane ÄŒibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 11 11:07:28 2004

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.