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

Re: svn commit: r937275 - in /subversion/trunk/subversion: include/svn_subst.h libsvn_subr/subst.c

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 23 Apr 2010 15:54:59 +0200

On Fri, Apr 23, 2010 at 01:01:24PM -0000, stsp_at_apache.org wrote:
> Author: stsp
> Date: Fri Apr 23 13:01:23 2010
> New Revision: 937275
>
> URL: http://svn.apache.org/viewvc?rev=937275&view=rev
> Log:
> Pool usage fixes in the translation stream.
>
> Do not maintain a private pool for each translation stream,
> because the user cannot control unbound growth of this "secret" pool.
> Instead, rely on callers to provide pools with sufficient lifetime
> when the stream is created. "make check" agrees.
>
> Suggested by: gstein
>
> * subversion/include/svn_subst.h
> (svn_subst_stream_translated): Rename POOL argument to RESULT_POOL.
> Document pool lifetime requirements for EOL_STR and KEYWORDS parameters.

It is unclear whether changing pool lifetime expectations of this API
is acceptable. This problem was known before commit. Greg wanted to
comment on this post-commit.

> --- subversion/trunk/subversion/include/svn_subst.h (original)
> +++ subversion/trunk/subversion/include/svn_subst.h Fri Apr 23 13:01:23 2010
> @@ -301,7 +301,9 @@ svn_subst_translate_stream(svn_stream_t
> * if @a repair is @c TRUE, convert any line ending to @a eol_str.
> * Recognized line endings are: "\n", "\r", and "\r\n".
> *
> - * The stream returned is allocated in @a pool.
> + * The stream returned is allocated in @a result_pool.
> + * @a eol_str and @a keywords are expected to be allocated in a pool
> + * with sufficient lifetime for use by the stream.
> *
> * If the inner stream implements resetting via svn_stream_reset(),
> * or marking and seeking via svn_stream_mark() and svn_stream_seek(),
Received on 2010-04-23 15:55:36 CEST

This is an archived mail posted to the Subversion Dev mailing list.