On 8/2/05, Christopher Ness <chris@nesser.org> wrote:
> Ok, here is my configure info and some version info:
Chris, thanks a lot for sending me this information! It is very helpful!
I've committed fixes in r15565 and r15566. More details below.
> [...]
> [nesscg@jackd python-bindings-improvements]$ python
> Python 2.2.3 (#1, Oct 15 2003, 23:33:35)
> [GCC 3.3.1 20030930 (Red Hat Linux 3.3.1-6)] on linux2
> [...]
> checking swig version... 1.3.24
> [...]
> [nesscg@jackd python-bindings-improvements]$ svnversion .
> 15551
>
> make check-swig-py 2>&1
> cd /home/nesscg/sandbox/python-bindings-improvements/subversion/bindings/swig/python; \
> /usr/bin/python2 /home/nesscg/sandbox/python-bindings-improvements/subversion/bindings/swig/python/tests/run_all.py
> EE
> ======================================================================
> ERROR: test_compatibility_layer (pool.PoolTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/nesscg/sandbox/python-bindings-improvements/subversion/bindings/swig/python/tests/pool.py", line 53, in test_compatibility_layer
> self.assertTrue(pool_ref())
> AttributeError: PoolTestCase instance has no attribute 'assertTrue'
>
> ======================================================================
> ERROR: test_pool (pool.PoolTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/nesscg/sandbox/python-bindings-improvements/subversion/bindings/swig/python/tests/pool.py", line 23, in test_pool
> self.assertTrue(parent_pool_ref())
> AttributeError: PoolTestCase instance has no attribute 'assertTrue'
>
> ----------------------------------------------------------------------
> Ran 2 tests in 0.013s
>
> FAILED (errors=2)
> make: *** [check-swig-py] Error 1
Good catch! I've used functionality which is only available in newer
versions of Python. I've fixed this for Python 2.2 in r15565.
>
> > 2) Please look at the code changes and send me your feedback. Any and
> > all comments are much appreciated!
>
> These were brought up by the compiler for `make swig-py`.
Thanks for the report! I'll try to fix as many of the warnings as I
can. See below.
/home/nesscg/sandbox/python-bindings-improvements/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:
In function `svn_swig_py_pool_destroyed':
> /home/nesscg/sandbox/python-bindings-improvements/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:144: warning: passing arg 2 of `PyObject_SetAttrString' discards qualifiers from pointer target type
Good catch. I forgot to properly typecast a pointer. Fixed in r15566.
> /home/nesscg/sandbox/python-bindings-improvements/subversion/include/svn_types.h:431: Warning(451): Setting const char * member may leak memory.
> /home/nesscg/sandbox/python-bindings-improvements/subversion/include/svn_types.h:432: Warning(451): Setting const char * member may leak memory.
> /home/nesscg/sandbox/python-bindings-improvements/subversion/include/svn_types.h:433: Warning(451): Setting const char * member may leak memory.
> /home/nesscg/sandbox/python-bindings-improvements/subversion/include/svn_types.h:434: Warning(451): Setting const char * member may leak memory.
> /home/nesscg/sandbox/python-bindings-improvements/subversion/include/svn_string.h:85: Warning(451): Setting const char * member may leak memory.
These warnings signal potential memory leaks, because SWIG and Python
don't keep track of the memory during Python->C variable assignments.
This bug is present on trunk as well. We haven't come up with a good
solution to this yet. Ideas?
The other warnings look relatively harmless.
>/home/nesscg/sandbox/python-bindings-improvements/subversion/include/svn_props.h:305:
Warning(305): Bad constant value (ignored).
This is caused by SWIG having trouble with a Subversion header file.
It still works, though.
/home/nesscg/sandbox/python-bindings-improvements/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:43:
> /usr/local/share/swig/1.3.24/python/pyrun.swg: In function
> `PySwigObject_GetType':
> /usr/local/share/swig/1.3.24/python/pyrun.swg:179: warning:
> initialization discards qualifiers from pointer target type
> /usr/local/share/swig/1.3.24/python/pyrun.swg: In function
> `PySwigPacked_GetType':
> /usr/local/share/swig/1.3.24/python/pyrun.swg:331: warning:
> initialization discards qualifiers from pointer target type
This looks like a harmless warning in the internals of SWIG 1.3.24 --
it doesn't show up in SWIG 1.3.25.
Cheers,
David
--
David James -- http://www.cs.toronto.edu/~james
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 3 17:02:57 2005