On Sat, Apr 25, 2009 at 19:34, Bert Huijben <rhuijben_at_sharpsvn.net> wrote:
>...
> +++ trunk/subversion/include/svn_io.h Sat Apr 25 10:34:55 2009 (r37473)
>...
> @@ -682,6 +686,12 @@ typedef svn_error_t *(*svn_write_fn_t)(v
> /** Close handler function for a generic stream. @see svn_stream_t. */
> typedef svn_error_t *(*svn_close_fn_t)(void *baton);
>
> +/** Reset handler function for a generic stream. @see svn_stream_t and
> + * svn_stream_reset().
> + *
> + * @since New in 1.7. */
> +typedef svn_error_t *(*svn_io_reset_fn_t)(void * baton);
We don't normally put a space between the '*' and the varname.
>...
> +++ trunk/subversion/libsvn_subr/stream.c Sat Apr 25 10:34:55 2009 (r37473)
>...
> @@ -109,6 +116,16 @@ svn_stream_write(svn_stream_t *stream, c
>
>
> svn_error_t *
> +svn_stream_reset(svn_stream_t *stream)
> +{
> + if (stream->write_fn == NULL)
> + return svn_error_create(SVN_ERR_STREAM_RESET_NOT_SUPPORTED, NULL, NULL);
Shouldn't that be stream->reset_fn ?
>...
> @@ -320,6 +344,12 @@ write_handler_disown(void *baton, const
> return svn_stream_write((svn_stream_t *)baton, buffer, len);
> }
>
> +static svn_error_t *
> +reset_handler_disown(void *baton)
> +{
> + return svn_stream_reset((svn_stream_t *)baton);
This cast is redundant. The void* will be automatically cast, based on
the function signature.
>...
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1916437
Received on 2009-04-25 23:04:57 CEST