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

Re: svn commit: rev 856 - trunk/subversion/include trunk/subversion/libsvn_wc trunk/subversion/libsvn_subr

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-01-12 11:53:20 CET

On Fri, Jan 11, 2002 at 04:38:11PM -0600, kfogel@tigris.org wrote:
>...
> * subversion/libsvn_wc/props.c (svn_wc__get_keywords): Compare
> characters against '\0', not NULL. Ben's compiler didn't print
> warnings for these! Mine does, though. They're both GCC 2.95blah,
> mine under Linux, his under FreeBSD. Go figure.

Has nothing to do with the compiler, but with the definition of NULL. You're
using glibc, FreeBSD doesn't. Thus, NULL can be defined very differently. I
would guess that Linux calls it ((void*)0) or somesuch, while FreeBSD just
calls it 0. The former doesn't match to integers/characters, while the
latter does.

>...
> +svn_error_t *svn_wc_translated_file (svn_stringbuf_t **xlated_p,
> + svn_stringbuf_t *vfile,
> + apr_pool_t *pool);

Could these have been "const svn_string_t *" ?

>...
> +++ NEW/trunk/subversion/libsvn_wc/diff.c Fri Jan 11 16:38:02 2002
>...
> + /* Note that this might be the _second_ time we translate
> + the file, as svn_wc_text_modified_p() might have used a
> + tmp translated copy too. But what the heck, diff is
> + already expensive, translating twice for the sake of code
> + modularity is liveable. */
> + SVN_ERR (svn_wc_translated_file (&translated, path,
> + dir_baton->pool));
> +
> + err = diff_cmd (pristine_copy, translated, path,
> + dir_baton->edit_baton->diff_cmd_baton);
> +
> + if (translated != path)

You might want to strengthen the comments in the doc for _translated_file to
point out that the caller can use pointer comparison for this.

>...
> +++ NEW/trunk/subversion/libsvn_wc/util.c Fri Jan 11 16:38:02 2002
>...
> +svn_wc_translated_file (svn_stringbuf_t **xlated_p,
> + svn_stringbuf_t *vfile,
> + apr_pool_t *pool)
> +{
>...
> + {
> + /* Because base_file and working file do not use the same eol
> + style, our only recourse is to convert one of them and do a
> + byte-for-byte comparison. */

That comment doesn't apply to this function.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:56 2006

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.