Re: svn commit: r982375 - in /subversion/branches/performance/subversion: include/svn_io.h libsvn_subr/stream.c
Bert Huijben wrote:
> [Repeating the first mail then... Thanks tele2 for breaking my e-mail for
> the second time this week :(]
>> -----Original Message-----
>> From: stefan2_at_apache.org [mailto:stefan2_at_apache.org]
>> Sent: woensdag 4 augustus 2010 22:22
>> To: commits_at_subversion.apache.org
>> Subject: svn commit: r982391 - in
>> /subversion/branches/performance/subversion: include/svn_io.h
>> Modified: subversion/branches/performance/subversion/include/svn_io.h
>> --- subversion/branches/performance/subversion/include/svn_io.h
>> +++ subversion/branches/performance/subversion/include/svn_io.h Wed Aug
>> 4 20:22:10 2010
>> @@ -926,23 +926,6 @@ svn_stream_from_aprfile2(apr_file_t *fil
>> /* "forward-declare" svn_file_handle_cache__handle_t */
>> struct svn_file_handle_cache__handle_t;
> If ^^^ this is a library private type (implied by the __).
>> +/** Create a stream from a cached file handle. For convenience, if @a
>> + * is @c NULL, an empty stream created by svn_stream_empty() is
>> + *
>> + * This function should normally be called with @a disown set to
>> + * in which case closing the stream will also return the file handle
>> + * the respective cache object.
>> + *
>> + * If @a disown is TRUE, the stream will disown the file handle,
>> + * that svn_stream_close() will not close the cached file handle.
>> + *
>> + * @since New in 1.7.
>> + */
>> +svn_stream_t *
>> + (struct svn_file_handle_cache__handle_t *file,
>> + svn_boolean_t disown,
>> + apr_pool_t *pool);
>> /** Create a stream for reading from a range of an APR file.
>> * The stream cannot be written to.
> Then this shouldn't be a public function, using that type.
> This function should then be moved to the cached file handle prefix and also
> use __ in its name.
> I don't think this API will have general use outside FSFS in 1.7? (But I can
> be mistaken)
> If not it should certainly be in a private header, to allow updating its api
> later without all our versioning rules for public APIs.
r983385 is the best I could come up with. It avoids code duplication
as well as a performance hit. However, it breaks the nice 1:1 relation
between source and header.
Received on 2010-08-09 12:10:13 CEST
This is an archived mail posted to the Subversion Dev