* davedissian-redundant-typedef-fix:
Add more runtime typedef_classforward_same_name runtime testing
Fixed 'typedef class Foo Foo;' edge case by iterating through linked list.
Added test case for a forward declaration in a typedef with the same name
- Remove python code from octave's std_basic_string.i
- Correctly return an error to fix error handling when using std::basic_string in
overloaded methods - issue #1171.
* radarsat1-fix-null-shared_ptr-directors:
Remove duplicate director shared_ptr pointer reference typemaps
For shared_ptr directorin, make copy of shared_ptr in all cases.
Add directorin typemap for Python and Ruby shared_ptr.
Specifying the minimum 32 bit signed int value is not easily portable.
Remove min_32bit_int2 method, min_32bit_int1 provides runtime coverage.
g++ 32bit resulted in:
warning: this decimal constant is unsigned only in ISO C90
and some versions of clang++ resulted in:
error: integer literal is too large to be represented in type 'long' and is subject to undefined behavior under C++98, interpreting as 'unsigned long'; this literal will have type 'long long' in C++11 onwards [-Werror,-Wc++11-compat]
32 bit and 64 bit compiled versions of SWIG generated different Python files
when default arguments were outside the range of 32 bit signed integers.
The default arguments specified in Python are now only those that are in the
range of a 32 bit signed integer, otherwise the default is obtained from C/C++ code.
Closes#1108
Fixes missing type information for std::complex in scripting languages.
Closes#732.
Update Javascript and Octave complextest, although they don't actually
get run as they don't work
Use std::move on this pointer as the default approach to supporting
rvalue ref-qualifiers if a user really wants to wrap.
std::move requires <memory> headers so add swigfragments.swg for all
languages to use common fragments. Just header file fragments for now.
Internally, handle function ref-qualifiers in the function decl type string.
Needed for a whole host of things to work like %feature and %rename.
Add %feature %rename and %ignore testing for ref-qualifiers.
Fixes#1059
Methods with rvalue ref-qualifiers are ignored by default as it is not
possible to have an rvalue temporary from the target language (which is
needed to call the rvalue ref-qualified method).
A warning 405 is shown mentioning the ignored rvalue ref-qualifier method
which can be seen with the -Wextra option.
cpp_refqualifier.i:15: Warning 405: Method with rvalue ref-qualifier ignored h() const &&.
Usually rvalue and lvalue ref-qualifier overloaded methods are written - the
lvalue method will then be wrapped.
* templates-scope-enforcement:
Test a few %template errors
Add using declarations to templates into typedef table.
Fix type lookup in the presence of using directives and using declarations
More docs on %template
Testcase fix for nameclash in php
%template scope enforcement and class definition fixes
Template documentation tweaks
More consistent formatting of examples in documentation
More consistent formatting of examples in documentation
Documentation corrections to use targetlang formatting
More consistent formatting of examples in documentation
More consistent formatting of examples in documentation
More consistent formatting of examples in documentation
Namespace documentation minor corrections
Improve description of template_parameters_resolve
Minor code optimisation in template_parameters_resolve
Fix scope lookup for template parameters containing unary scope operators
Typemap change for templates
Fixes#1051. Using declarations to templates were missing in SWIG's internal typedef tables.
This led to a few problems, such as, templates that did not instantiate and generated
C++ code that did not compile as SWIG did not know what scope the template was
in. This happened mostly when a using declaration was used on a template type in a
completely unrelated namespace.
For templates only, the template parameters are fully resolved when
handling typemaps. Without this, it is too hard to have decent rules
to apply typemaps when parameter types are typedef'd and template
parameters have default values.
Fixes %clear for typedefs in templates, eg:
%typemap("in") XXX<int>::Long "..."
template typename<T> struct XXX {
typedef long Long;
};
%clear XXX<int>::Long;
as the typemap was previously incorrectly stored as a typemap for long
instead of XXX<int>::Long.
1. Fix negative octals. Currently not handled correctly by `-py3`
(unusual case, but incorrect).
2. Fix arguments of type "octal + something" (e.g. `0640 | 04`).
Currently drops everything after the first octal. Nasty!
3. Fix bool arguments "0 + something" (e.g. `0 | 1`) are always
"False" (unusual case, but incorrect).
4. Remove special handling of "TRUE" and "FALSE" from
`convertValue` since there's no reason these have to match
"true" and "false".
5. Remove the Python 2 vs. Python 3 distinction based on the
`-py3` flag. Now the same python code is produced for default
arguments for Python 2 and Python 3. For this, octal default
arguments, e.g. 0644, are now wrapped as `int('644', 8)`. This
is required, as Python 2 and Python 3 have incompatible syntax
for octal literals.
Fixes#707
This ensures NotImplemented is returned on error so that the Python
interpreter will handle the operators correctly instead of throwing an
exception. NotImplemented was not being returned for non-builtin wrappers
when the operator overload did not have a function overload.
See PEP 207 and https://docs.python.org/3/library/constants.html#NotImplemented
Mentioned in SF patch #303 and SF bug #1208.
* 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