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

Re: svn commit: r15370 - in branches/python-bindings-improvements/subversion/bindings/swig: python/libsvn_swig_py python/svn

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-07-20 00:00:17 CEST

djames@tigris.org writes:

> Author: djames
> Date: Tue Jul 19 15:54:49 2005
> New Revision: 15370

> +++ branches/python-bindings-improvements/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Tue Jul 19 15:54:49 2005
> @@ -109,6 +109,61 @@
>
>
>
> +/*** Automatic Pool Management Functions ***/
> +
> +/* The application pool */
> +apr_pool_t *_global_pool = NULL;

That's not a good name for something that is globally visible, how about
svn_swig_py_application_pool?

> +static char *poolAttribute = (char *) "_pool";
> +static char *assertValid = (char *) "assert_valid";
> +static char *emptyTuple = (char *) "()";

Casting away const is generally a bad idea, how about

static char name[] = "value";

> +
> +
> +/* Set the application pool */
> +void svn_swig_py_set_application_pool(apr_pool_t *pool)
> +{
> + _global_pool = pool;
> +}
> +
> +/* Clear the application pool */
> +void svn_swig_py_clear_application_pool()
> +{
> + _global_pool = NULL;
> +}
> +
> +/* Get the application pool */
> +apr_pool_t *svn_swig_py_get_application_pool()
> +{
> + return _global_pool;
> +}

Given that function interface, why is _global_pool extern and not
static?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 20 00:01:06 2005

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.