On 12/15/05, Greg Hudson <email@example.com> wrote:
> On Thu, 2005-12-15 at 21:55 +0100, Erik Huelsmann wrote:
> > Exactly, because it doesn't solve the case where I want to be able to
> > return a stream which is already stacked on a resource I'm not
> > returning.
> Ah, I see now.
> So, I see the credible options as:
> 1. Create an ownership-breaking stream for temporarily stacking
> streams on top of resources you don't own.
> 2. When you're temporarily stacking a stream on an un-owned resource,
> just don't close the stream. Add an svn_stream_flush() if we have to.
> Either is fine with me; you know the details better than I do.
Ok. I'll go with (1) then, because with (2) we can end up with a
number of streams all independently stacked on the same stream.
Especially if / when we decide to register destructors for all stream
types, all these streams would end up destructing the same borrowed
stream. This won't happen with (1), because there will be 1 owner, so
only 1 call to the destructor.
Anybody who has a better idea than svn_stream_wrap_borrowed_ref() or
Received on Thu Dec 15 23:52:40 2005