In testing my swig'd library with 1.3.28rc1, I was getting segfaults;
these same interface files worked in 1.3.27. It breaks in ruby, lua,
and java.
It took a while to whittle down, but it appears to be coming from doing
forward declarations after a class already has been declared. This is
fine to do in C++, so it should be fine to do in SWIG.
An offending sample is below.
Cheers,
Evan
------------------------------------------
%module test
namespace ns {
// declared in some header, %included in my interface file
class Foo {
public:
Foo();
};
// in my interface file, this comes from some other %include
class Foo; // comment it out to make this interface file work
// extending in the interface file
%extend Foo {
int bar() { return 0; }
};
} // namespace ns
|