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

Re: libsvn_wc/status.c:assemble_status() doc string lies?

From: <kfogel_at_collab.net>
Date: 2005-10-04 21:17:17 CEST

Daniel Rall <dlr@finemaltcoding.com> writes:
> assemble_status() produces a svn_wc_status2_t. Part of its input for
> assembly of that structure is a svn_wc_entry_t. About that entry, it
> claims:
> ENTRY may be null, for non-versioned entities. In this case, we
> will assemble a special status structure item which implies a
> non-versioned thing.
> Else, ENTRY's pool must not be shorter-lived than STATUS's, since
> ENTRY will be stored directly, not copied. <==== *
> However, it appears to do a deep copy of entry:
> stat->entry = svn_wc_entry_dup (entry, pool);
> >From svn_wc.h:
> /** Return a duplicate of @a entry, allocated in @a pool. No part of the new
> * entry will be shared with @a entry.
> */
> svn_wc_entry_t *svn_wc_entry_dup (const svn_wc_entry_t *entry,
> apr_pool_t *pool);
> It seems that it is then a lie that we care about the lifetime of entry's
> pool?

I think you're right. And the code appears to have been that way for
a very long time, it was r205 that did it. I think we can just remove
that bit from assemble_status()'s doc string. I can do it if you
want, but since you noticed, it makes sense for your name to be on the
commit. Let me know if you want me to make the tweak.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 4 22:26:47 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.