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

Re: New API svn_stream_lazyopen_create - documentation

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 23 Apr 2013 13:58:38 -0400

On 04/23/2013 01:53 PM, Julian Foad wrote:
> This new API was introduced recently and is intended to be back-ported to 1.8.0. It needs better documentation. I suggest:
>
>
> [[[
>
> Index: subversion/include/svn_io.h
> ===================================================================
> --- subversion/include/svn_io.h (revision 1471068)
> +++ subversion/include/svn_io.h (working copy)

[...]

> /** Return a generic stream which wraps another primary stream,
> * delaying the "opening" of that stream until the first time the
> - * stream is accessed.
> + * returned stream is accessed.
> *
> * @a open_func and @a open_baton are a callback function/baton pair
> - * invoked upon the first read of @a *stream which are used to open the
> - * "real" source stream.
> + * which will be invoked upon the first read or write of the returned
> + * stream. The callback shall open the primary stream.
> *
> * @note If the only "access" the returned stream gets is to close it
> * then @a open_func will only be called if @a open_on_close is TRUE.
> *
> * @since New in 1.8.
> */
> ]]]
>
> Does that suggestion properly document it?

Looks good for the most part. Strictly speaking, though, any of the 'read',
'mark', 'skip' or 'write' operations will trigger the
open-if-not-yet-opened() logic of the lazyopen stream.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

Received on 2013-04-23 19:59:12 CEST

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.