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

Re: svn commit: r17232 - branches/svndiff1/subversion/libsvn_delta

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-11-07 19:17:07 CET

Daniel Berlin <dberlin@dberlin.org> writes:

> On Mon, 2005-11-07 at 17:54 +0000, Philip Martin wrote:
>> The err variable was present before your change, but I'm not sure why
>> it exists. Is there some reason that the statements that set err, the
>> calls to svn_stream_write, don't use SVN_ERR? Perhaps it's important
>> that the svn_destroy_pool line at the end of the function gets
>> executed even when an error occurs? If so then your use of SVN_ERR
>> might be wrong since it will bypass that line. There is a similar
>> problem with the SVN_ERR that occurs near the start of the function,
>> but that might be a bug as well.
>
> Hmmmmmmmmmmmmmmmmmmmm.
> I think i'm just going to replace this with some gotos, since that seems
> the cleanest way to ensure the pool gets destroyed, but that the correct
> value of err is there.
> Unless you've got a better idea.

It's not clear to me why this pool is special. We don't usually go
out of our way to destroy subpools on error, we rely on it happening
when the parent pool is cleared. Can we get rid of err and use
SVN_ERR everywhere? I don't know whether that's the right thing to
do. Is this subpool special?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 7 19:18:29 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.