This fixes the case when an integer is used as the initializer, such as:
struct W { static const char w = 100; };
The "valuetype" attribute has been added to the "cdecl" Node which enables
us to distinguish the declared type from the type of the initializer.
It is possible that the module we're wrapping defines an Exception
class. This will confuse code that uses an unqualified "Exception"
class (e.g. "try: ... except Exception") since it now won't match
the Python builtin Exception. Fix this by explicitly using
the class from the __builtin__ module ("builtins" in Python 3).
* ahnolds-Win64_ptrdiff_t:
Adding required define at beginning
Unit tests for ptrdiff_t/size_t max/min in Python
Python2 build on x64 should no longer fail
Don't use long long if it isn't available
Add support for ptrdiff_t and size_t == long long
Adding unit tests for operator overloading to determine which overload was chosen
Allow TypeError when testing overloads since it is generated instead
of NotImplementedError when swig is run with -O or -fastdispatch
* missing-initializers:
Tcl fix when using -Wmissing-field-initializers warnings
Php fix for -Wmissing-field-initializers warning
Fixes for Octave and missing -Wmissing-field-initializers in swig_octave_member
Fixes for Ruby and using -Wmissing-field-initializers
R test case warning fixes
Use -Wmissing-field-initializers warning testing all languages on Travis
* coleb-python35_dtor_exception_fix:
Add test case for Python 3.5 assertion with a pending StopIteration
Amend python_destructor_exception runtime test
Call PyErr_WriteUnraisable if a destructor sets a Python exception (-builtin)
Extended zjturner's changes to encompass all function dispatch and use PyErr_WriteUnraisable to handle exceptions during __del__.
Python - Save and restore exception state before calling destroy.
Suppress the message that PyErr_WriteUnraisable writes to stderr,
but check that it is called by checking some of the expected message contents.
The output varies slightly for different versions of Python and -builtin
Hack to use the std::array support for boost::array.
Is limited as it currently exposes some 'using' bugs in SWIG.
For example, the type system fails to see that pointers to std::array
and pointers to boost::array are the same.
This approach saves having to maintain separate boost::array support.
The 'using' bug ought to be fixed, otherwise separate boost_array.i
files could be easily made from the std_array.i files.
Setting an STL container wrapper slice better matches the way Ruby
arrays work. The behaviour is now the same as Ruby arrays. The only
exception is the default value used when expanding a container
cannot be nil as this is not a valid type/value for C++ container
elements.
Access via ranges and slices now behave identically to Ruby arrays.
The fixes are mostly for out of range indices and lengths.
- Zero length slice requests return an empty container instead of nil.
- Slices which request a length greater than the size of the container
no longer chop off the last element.
- Ranges which used to return nil now return an empty array when the
the start element is a valid index.
Using negative indexes to set values works the same as Ruby arrays, eg
%template(IntVector) std::vector<int>;
iv = IntVector.new([1,2,3,4])
iv[-4] = 9 # => [1,2,3,9]
iv[-5] = 9 # => IndexError
These work much like any of the other STL containers except Python slicing
is somewhat limited because the array is a fixed size. Only slices of
the full size are supported.
Fix %shared_ptr support for private and protected inheritance.
- Remove unnecessary Warning 520: Derived class 'Derived' of 'Base'
is not similarly marked as a smart pointer
- Do not generate code that attempts to cast up the inheritance chain in the
type system runtime in such cases as it doesn't compile and can't be used.
Remove unnecessary warning 520 for %shared_ptr when the base class is ignored.
Reinstates autodoc for callback function testcase from #467, actually
tests the resulting docstring in the _runme.py and fixes SWIG/Python
so the expected result is obtained.