Philip Martin wrote:
> Julian Foad <julianfoad@btopenworld.com> writes:
>
>> err = svn_wc_entry (..., subpool); /* ### Wrong: needed throughout */
>
> svn_wc_entry is a bit special, the pool is only used for allocations
> that never leave the function. The pointer that is returned points
> into the entries cache and so remains valid for the lifetime of the
> access baton.
Ah, yes. OK. I see that its doc. string does effectively say that, but I suggest the patch below to clarify it.
(In fact, J. Erenkrantz has now pointed out that the "entry" retrieved in that line was not needed throughout the function anyway. My mistake.)
- Julian
[[[
Clarify pool usage in description of svn_wc_entry.
* subversion/include/svn_wc.h
(svn_wc_entry): Explictly state that the pool is for internal use only.
]]]
Index: subversion/include/svn_wc.h
===================================================================
--- subversion/include/svn_wc.h (revision 7899)
+++ subversion/include/svn_wc.h (working copy)
@@ -806,6 +806,8 @@
* Note that it is possible for @a path to be absent from disk but still
* under revision control; and conversely, it is possible for @a path to
* be present, but not under revision control.
+ *
+ * Use @a pool only for local processing.
*/
svn_error_t *svn_wc_entry (const svn_wc_entry_t **entry,
const char *path,
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 2 23:42:46 2003