'brew install guile' does not complete within 10 minutes and the build is then killed by Travis
Suggestion and original script from travis-ci/travis-ci#1961
I managed to trace a very nasty Python interpreter segfault to an
allocation failure here. Adding this after the tp_new call:
if (PyErr_Occurred()) {
PyErr_Print();
}
results in output of 'TypeError: object() takes no parameters', followed
by a segfault that takes down the Python interpeter.
The 'object' constructor doesn't seem to be suitable for instantiating
SWIG shadow instances in this way, so simply use the constructor
function in the PyTypeObject 'tp_new' slot of data->newargs.
The 'if (inst)' check after this doesn't hurt in as much as it prevented
a segfault immediately after this failed allocation, but it doesn't help
much since the null pointer dereference will probably happen sooner or
later anyway.
The test-suite requires Test::More and the local versions of Test::More
were removed in 1d1e8650a3. They are not
always distributed with Perl, such as Perl 5.16 in Fedora.
The Octave examples and test-suite were picking up any CXXFLAGS and CPPFLAGS
exported into the environment creating way too many warnings running the
Octave tests if the compiler flags for building SWIG were exported rather
than passed to configure.
Ruby 2.0 enforces explicit string encodings. The char_constant
testcase fails because the internal (SWIG_FromCharPtrAndSize, using
rb_str_new) defaults to ASCII-8BIT while the test-suite file defaults
to the current shell LOCALE setting.
This patch sets the char_constant_runme.rb encoding to ASCII-8BIT.
The erase and insert methods in the containers use const_iterator instead
of iterator in C++11. There are times when the methods wrapped must match
the parameters exactly. Specifically when full type information for
template types is missing or SWIG fails to look up the type correctly,
for example:
%include <std_vector.i>
typedef float Real;
%template(RealVector) std::vector<Real>;
SWIG does not find std::vector<Real>::iterator because %template using
typedefs does not always work and so SWIG doesn't know if the type is
copyable and so uses SwigValueWrapper<iterator> which does
not support conversion to another type (const_iterator). This resulted
in compilation errors when using the C++11 version of the containers.
Closes#73
Conflicts:
CHANGES.current
Lib/std/std_unordered_map.i
Lib/std/std_unordered_set.i
Commit #c3f3880d caused the functions
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State* L,
swig_lua_namespace* ns)
and
SWIGINTERN int SWIG_Lua_namespace_register(lua_State* L,
swig_lua_namespace* ns)
to return void when int returns were expected resulting in the build
failures for plplot's lua bindings for example. This commit fixes the
issue.
Closes#92
* wkalinin-nested-ignore:
Restore warning suppression in testcase
Typo in comment fix
warnings suppressed for deeply nested classes
nested nested class warning filtered
warning filter fixed
error order foxed
WARN_PARSE_UNNAMED_NESTED_CLASS check fixed
more warnings removed
warnfilter fixed scoping for "anonymous forward declaration" fixed
%feature ("flatnested") is set for nested scope test
added forward declaration instead of ignored nested class (resurrected old code)
filtered warnings, turned on "flatnested" for nested template test
Nested classes support is diversified, depending on the language capability. If the language cannot support nested classes, they will be unconditionally moved to the global namespace. If language module does not override Language::nestedClassesSupport() function, nested classes will be ignored, unless "feature:flatnested" is used.