[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: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2005-07-20 16:57:59 CEST

On Tue, 2005-07-19 at 23:00 +0100, Philip Martin wrote:
> 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

It's not just a bad idea, it doesn't actually do anything.
IE the compiler is free to ignore any store to something it knows was
originally const qualified.

(C99 6.7.3: "If an attempt is made to
modify an object defined with a const-qualified type through use of an
lvalue with non-const-qualified type, the behavior is undefined")

In this case, all compilers i'm aware use the behavior "ignore the
attempt" :)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 20 16:58:46 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.