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

Re: [PATCH]remove adm_access batons in svn_wc_translated_file3()

From: Hyrum K. Wright <hyrum_at_hyrumwright.org>
Date: Mon, 10 Aug 2009 20:18:24 -0500

On Aug 10, 2009, at 8:08 PM, HuiHuang wrote:

> Hey Julian,
>
>>> * Output files are created in the temp file area belonging to
>>> - * @a versioned_file. By default they will be deleted at pool
>>> cleanup.
>>> + * @a versioned_abspath. By default they will be deleted at
>>> scratch_pool cleanup.
>>> *
>>> * If @c SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP is specified, the
>>> default
>>> - * pool cleanup handler to remove @a *xlated_path is not
>>> registered.
>>> + * result_pool cleanup handler to remove @a *xlated_path is not
>>> registered.
>
>> The first of these two paragraphs refers to "scratch_pool cleanup"
>> and
>> the second to "result_pool cleanup". Shouldn't they both refer to the
>> same pool?
> Originally the function use a single pool for memory allocation
> while now we use result_pool
> for output variables and scratch_pool for the temp.
>
> The temp files are allocated from scratch_pool and xlated_path is
> allocated from result_pool,
> that is why there is difference.
>
> That is what I think about it, is that right?

Are they both output values? I believe so, and if that's the case
then they should both go in result_pool.

(This is actually a bit tricky, since the file isn't strictly an
output parameter, but it is instead a tangible side-effect of the
function, which we want to persist for some amount of time. Stuff
allocated in scratch_pool isn't guaranteed to exist beyond the scope
of the function.)

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2382276
Received on 2009-08-11 03:19:02 CEST

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.