- changed 3 files
[Reverted in r1700774.]Add a function to destroy / remove a mark from a stream.For some streams, a mark is a relatively expensive object. Merely relyingon timely pool cleanups is not always enough because our pool usage patternoften relies on the caller to clean up pools in a timely manner. Havingexplicit control over the lifetime of stream marks similar to what we havewith file objects will improve ease of use.In this patch, only wrapping streams and those with "heavy" mark objectsimplement svn_stream_remove_mark(). For all other streams that supportsvn_stream_mark() it defaults to a no-op.We use the new API in svn_stream_readline() to prevent long-living markson the new buffering read stream wrapper. This, in turn, limits the buffersize of that stream to 2x SVN__STREAM_CHUNK_SIZE in all non-degeneratecases.* subversion/include/svn_io.h (svn_stream_remove_mark_fn_t, svn_stream_set_remove_mark, svn_stream_remove_mark): Definition trio for the new public stream API.* subversion/libsvn_subr/stream.c (svn_stream_t): Add a function table entry for the new function. (svn_stream_set_remove_mark): Implement new public API. (svn_stream_remove_mark): Same. Make it a no-op by default. (stream_readline_chunky): Use the new API to release stream marks asap. (remove_mark_handler_disown, svn_stream_disown): Explicitly implement the new API as forwarding to the wrapped stream. (buffering_stream_wrapper_mark): Extend the mark object such that we can call the cleanup explicitly. (mark_handler_buffering_wrapper): Update mark constructor. (remove_mark_handler_buffering_wrapper, svn_stream_wrap_buffered_read): Explicitly implement the new API with the same effect as an explicit pool cleanup. (seek_handler_lazyopen, svn_stream_lazyopen_create): Explicitly implement the new API as forwarding to the wrapped stream.* subversion/libsvn_subr/subst.c (translated_stream_seek, stream_translated): Same.