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