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

Re: [PATCH] libsvn_client: Avoid direct call to svn_pool_create()function

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-01-09 20:12:31 CET

On Tue, 09 Jan 2007, Bhuvaneswaran Arumugam wrote:

> Hello,
>
> Please find attached the patch.

It would be useful to have a description of why your patches are
necessary (e.g. what's the problem you're trying to solve)?

> [[[
> Avoid calling svn_pool_create() function directly for passing the return
> value as an argument.
>
> * subversion/libsvn_client/prop_commands.c
> (svn_client_proplist2): Avoid calling svn_pool_create() function
> directly for passing the return value as an argument for
> remote_proplist() function.
>
> Patch by: bhuvan
> Reviewed by: kameshj
> ]]]

Index: subversion/libsvn_client/prop_commands.c
===================================================================
--- subversion/libsvn_client/prop_commands.c (revision 22939)
+++ subversion/libsvn_client/prop_commands.c (working copy)
@@ -1110,9 +1110,11 @@

       SVN_ERR(svn_ra_check_path(ra_session, "", revnum, &kind, pool));

+ apr_pool_t *scratchpool = svn_pool_create(pool);
       SVN_ERR(remote_proplist(*props, url, "",
                               kind, revnum, ra_session,
- recurse, pool, svn_pool_create(pool)));
+ recurse, pool, scratchpool));
+ svn_pool_destroy(scratchpool);
     }
   else /* working copy path */
     {

IIUC, we typically call the local variable "subpool". More
importantly, you can't declare a variable at that point -- its
declaration needs to come earlier (though it's definition is probably
best where yo uhave it).

  • application/pgp-signature attachment: stored
Received on Tue Jan 9 20:12:00 2007

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.