> -----Original Message-----
> From: Stefan Sperling [mailto:stsp_at_elego.de]
> Sent: zondag 16 augustus 2009 16:28
> To: Martin Hauner
> Cc: dev_at_subversion.tigris.org; Greg Stein
> Subject: Re: [PATCH, test] modify libsvn_wc to use
> result_pool/scratch_pool
>
> >
> > if (kind != svn_node_none && kind != svn_node_dir)
> > {
> > @@ -56,12 +57,12 @@
> > Might happen if there's a file in the way, for example. */
> > return svn_error_createf(APR_ENOTDIR, NULL,
> > _("'%s' is not a directory"),
> > - svn_dirent_local_style(path, pool));
> > + svn_dirent_local_style(path,
> scratch_pool));
>
> I'm not really sure about this one. You are returning an error,
> and which pool to use depends on the caller's behaviour.
>
> Maybe there is a convention for this, I'm not sure. Greg?
svn_error_createf() copies all arguments to a pool for the error message, so
you can just use the scratch pool here. (Each error chain has its own
apr_pool, which is destroyed by clearing the error).
Bert
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2384087
Received on 2009-08-16 18:55:33 CEST