* vadz-csharp-complex:
Add header to std_complex.i
Fix linkage problems in C# std::complex wrappers
C# std::complex wrappers marshalling by value
C# std::complex wrappers SwigValueWrapper fix
Use %naturalvar for C# std::complex wrappers
Allow avoiding generation of unwanted std::complex<T> typemaps
Also apply csvar{in,out} typemaps to std::complex references
Add std_complex.i for C# too
Extend C# complex support to member variables of this type
Add support for std::complex<> to C#
Use new unified Mono mcs compiler if available under Unix
Define csvar{in,out} typemaps needed to support properties of complex type and
apply the existing cstype and csin ones to them as well.
Add unit test verifying that this works as expected in C# and, also, in
Python, even though no changes were needed there.
* fschlimb-templ_def_cache:
Add template_default_cache runtime tests
Fix template_default_cache testcase
template_default_cache is a multi-module test
using 2-level caching as suggested by @wsfulton
account for explicitly qualified scopes
adding test
restricting chaching template default types
Add optional moduleimport attribute to %module so that the
default module import code can be overridden. See the
"Searching for the wrapper module" documentation in Python.html.
Example:
%module(moduleimport="import _foo") foo
$module also expands to the low-level C/C++ module name, so
the following is the same as above
%module(moduleimport="import $module") foo
Issue https://github.com/swig/swig/issues/769
These are not working yet for all combinations of builtin and PY3
The goal is to have a sensible default error that states that
pickling is not supported.
The metaclass (SwigPyObjectType) for SWIG objects was not defined in
a way that let importlib successfully import the Python wrappers.
The pickle module failed because it couldn't determine what module the
SWIG wrapped objects are in.
I've changed the definition of SwigPyObjectType using more normal
builtin type definitions. There are still some open questions:
- None of the builtin types, like swig_static_var_getset_descriptor and
SwigPyObject are added into any module. No call to PyModule_AddObject
is made, so isinstance cannot be used for any wrapped type, all of
which are derived from SwigPyObject.
Closes#808
The closure names used for builtin slots are mangled with their functype so
that overloaded C++ method names can be used for multiple slots.
For example:
%feature("python:slot", "mp_subscript", functype="binaryfunc") SimpleArray::__getitem__;
%feature("python:slot", "sq_item", functype="ssizeargfunc") SimpleArray::__getitem__(Py_ssize_t n);
will generate closures:
SWIGPY_SSIZEARGFUNC_CLOSURE(_wrap_SimpleArray___getitem__) /* defines _wrap_SimpleArray___getitem___ssizeargfunc_closure */
SWIGPY_BINARYFUNC_CLOSURE(_wrap_SimpleArray___getitem__) /* defines _wrap_SimpleArray___getitem___binaryfunc_closure */
Default hash is the underlying C/C++ pointer.
This matches up with testing for equivalence (Py_EQ in SwigPyObject_richcompare)
which compares the pointers.
If the wrong return type in the hash function was used, an error:
SystemError: error return without exception set
was raised
Add some tests for testing builtin slots
Also fixes -O.
This is a minimal change avoiding the differences in the function names
when -fastproxy is used until autodoc code is improved with doxygen
changes.
Closes#721.
Testcase has now been modified to mask the problem by providing the default parameter 'int' in:
%shared_ptr(Space::BaseDefault<short, int>)
If this is not done then d fails to convert to BaseDefault<short>&
This needs fixing in SWIG, but the problem is masked for now, so that the python
testcase works when run with the -O option.
Fixes SF bug 3333549 - %shared_ptr fixes when the type is a template using
template parameters that are typedef'd to another type.
Also fixes python -O optimization where the smart pointer conversion to the
base class needs to work because of the virtual methods that have been
optimized away.
* ejulien-python_operator_overload_test_suite:
Add __str__ to operator_overload testcase for python builtin
Python operator_overload runtime testcase cleanup
Work around a limitation of the Python binding generator related to the += family of operators.
Fix Python 3 division member operator when -builtin is not used.
Fix class member division operator.
Remove the PY3BUILTIN switch as its behavior can be achieved with the existing SWIG_FEATURES=-builtin switch.
Implement the operator overload test suite for Python.
Conflicts:
Examples/test-suite/operator_overload.i