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

RE: svn commit: r37473 - in trunk/subversion: include libsvn_subr

From: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Sat, 25 Apr 2009 23:16:42 +0200

> -----Original Message-----
> From: Greg Stein [mailto:gstein_at_gmail.com]
> Sent: zaterdag 25 april 2009 23:05
> To: dev_at_subversion.tigris.org
> Subject: Re: svn commit: r37473 - in trunk/subversion: include
> libsvn_subr
>
> 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.

Updated
>
> >...
> > +++ 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 ?

Good catch!

>
> >...
> > @@ -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.

See r37476. (2 other cases fixed as well)

Thanks,
        Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1916613
Received on 2009-04-25 23:17:22 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.