3 Dec 02:59
Bug in SWIG 1.3.35 with std::vector type system?
From: Ben Webb <ben <at> salilab.org>
Subject: Bug in SWIG 1.3.35 with std::vector type system?
Newsgroups: gmane.comp.programming.swig
Date: 2008-12-03 02:03:28 GMT
Subject: Bug in SWIG 1.3.35 with std::vector type system?
Newsgroups: gmane.comp.programming.swig
Date: 2008-12-03 02:03:28 GMT
I have encountered a problem with SWIG 1.3.35 and later with a fairly
simple usage of std::vector. (I have opened a bug on the tracker
containing the same information, #2380788.) What seems to be happening
is that the SWIG runtime is getting confused about the type of the
std::vector.
For example, running 'make' with the following Makefile and test.i works
(produces no output from Python) with SWIG 1.3.34, but fails on SWIG
1.3.35, 1.3.36 and SVN r10960 with the error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "test.py", line 130, in insert
def insert(self, *args): return _test.vectorf_insert(self, *args)
NotImplementedError: Wrong number of arguments for overloaded function
'vectorf_insert'.
Possible C/C++ prototypes are:
insert(std::vector< float > *,std::vector< float
>::iterator,std::vector< float >::value_type const &)
insert(std::vector< float > *,std::vector< float
>::iterator,std::vector< float >::size_type,std::vector< float
>::value_type const &)
Obviously this makes STL vectors rather hard for us to use in practice!
I ran into the problem with Fedora 10's package of SWIG 1.3.35 (Fedora
9's build of 1.3.33 works just fine) but confirmed that it also fails
for me with 1.3.35 built from your upstream sources. (But ideally a
backport of any fix to 1.3.35 would be useful, so that Fedora can patch
their package without having to upgrade to an SVN snapshot.)
(Continue reading)
RSS Feed