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

Re: svn commit: r1335566 - in /subversion/trunk/subversion: include/svn_io.h libsvn_subr/stream.c

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 8 May 2012 14:25:16 -0400

On Tue, May 8, 2012 at 11:06 AM, <cmpilato_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_subr/stream.c Tue May  8 15:06:18 2012
>...
> +/* Implements svn_stream_stream_fn_t */
> +svn_error_t *
> +svn_stream_lazyopen_create(svn_stream_t **stream,
> +                           svn_stream_lazyopen_func_t open_func,
> +                           void *open_baton,
> +                           apr_pool_t *result_pool)

Implements what?! That comment seems like a copy/paste-o.

> +{
> +  lazyopen_baton_t *lob = apr_pcalloc(result_pool, sizeof(*lob));
> +
> +  lob->open_func = open_func;
> +  lob->open_baton = open_baton;
> +  lob->real_stream = NULL;
> +  lob->pool = result_pool;
> +
> +  *stream = svn_stream_create(lob, result_pool);
> +  svn_stream_set_read(*stream, read_handler_lazyopen);
> +  svn_stream_set_skip(*stream, skip_handler_lazyopen);
> +  svn_stream_set_write(*stream, write_handler_lazyopen);
> +  svn_stream_set_close(*stream, close_handler_lazyopen);
> +  svn_stream_set_mark(*stream, mark_handler_lazyopen);
> +  svn_stream_set_seek(*stream, seek_handler_lazyopen);
> +
> +  return SVN_NO_ERROR;
> +}

Per my suggestion on IRC, I don't see how this function can ever
error, or ever need a scratch_pool (no matter how we might
extend/upgrade it). I'd suggest updating the signature accordingly.

Cheers,
-g
Received on 2012-05-08 20:25:49 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.