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

Re: svn commit: r13393 - in branches/locking/subversion: include libsvn_client libsvn_wc

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-03-16 19:39:54 CET

On Wed, 16 Mar 2005, Julian Foad wrote:

> Peter N. Lundblad wrote:
> > On Wed, 16 Mar 2005, Philip Martin wrote:
> >>lundblad@tigris.org writes:
> >>>+ ancestor = svn_path_get_longest_ancestor (url, rb->ancestor, pool);
> [...]
> >>>+ len = strlen (ancestor);
> >>>+ if (len < strlen (rb->ancestor))
> >>>+ rb->ancestor[len] = '\0';
> >>
> > svn_path_get_longest_ancestor will always copy the common ancestor, even
> > if it is identical to one of the paths. (It has to, since it returns
> > non-const char*) This means a copy of the URL for each call,
>
> "svn_path_get_longest_ancestor" already makes a copy of the URL for each call;
> you cannot avoid that.
>
Ofcourse not:-)

> However, this would mean that any temporary allocations performed within
> "svn_path_get_longest_ancestor" would accumulate in "rb->pool"; perhaps that is
> what you are purposefully avoiding.
>
Exactly.

Thanks,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 16 19:37:31 2005

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.