> * The decision about whether the bottom-most stream owns its file should be
> made by the code that creates that stream from the file, and subsequent
> functions that play with the stream need not and should not be able to change
> that decision.
> Isn't that the right solution?
Ok. I slept on it and decided to use the svn_client_cat2() example to
illustrate what I *am* talking about.
If you look at svn_client_cat2, you'll find it's passed a stream *out
parameter. I want to create a svn_subst_stream_translated () which
forwards its output to the out stream. Translated streams must be
closed in order to flush the translation buffers.
With the current ownership model, that would be a problem (closing the
translated stream), because it would also close the out stream.
Closing the out stream is no-go, however, since we can't start closing
streams we didn't create.
Looking at the command line client (cmd-cat.c), you can see the out
stream is created once through a call to svn_stream_for_apr_stdout()
and passed to svn_client_cat2 for every target given on the command
line. If the first call closes the stream in order to flush the
translation buffers of the translated stream, that would introduce
Hope I was clearer this time.
Received on Fri Dec 16 23:03:49 2005