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

Re: svn commit: r1329778 - /subversion/trunk/subversion/libsvn_subr/string.c

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 24 Apr 2012 11:50:08 -0400

On Apr 24, 2012 11:19 AM, <danielsh_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_subr/string.c Tue Apr 24 15:19:19
2012
> @@ -942,8 +942,10 @@ static const char decimal_table[100][4]
> *(apr_uint16_t*)(dest) = *(apr_uint16_t*)(source);
> #else
> # define COPY_TWO_BYTES(dest,source) \
> + do { \
> (dest)[0] = (source)[0]; \
> - (dest)[1] = (source)[1];
> + (dest)[1] = (source)[1]; \
> + while (0)
> #endif

Is that one of the performance-sensitive things Stefan^2 worked on? If so,
then I wonder if compilers will always be able to strip the do/while. Maybe
instead:

((dest)[0] = (source)[0], (dest)[1] = (source)[1])

That shouldn't trip up any compilers.

Cheers,
-g
Received on 2012-04-24 17:50:42 CEST

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.