PHP5's C extension API has changed substantially so you need to use
-php7 to specify you want PHP7 compatible wrappers.
Fixes https://github.com/swig/swig/issues/571
* jiulongw-master:
Fix go wrapper compilation error
Fix missing semicolon in golang wrapper
Fix extra quote escape in golang
Fix #define error when value contains char in compound expression
Add more test case for char const expression in enum
Revert "Add enum test cases with const char in compound expression"
Add runtime tests for char in compound expression patch
Add enum test cases with const char in compound expression
Fix enum error when value contains char in compound expression
* [Go] Fix argument names in inherited functions #795
This commit fixes a wrong argument name replacement in the inherited functions as well as a memory leak.
* Add testcase for #795
* Move variable_replacement testcase into common
* Move variable_replacement testcase into common
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 */
Previously the return value of call_user_function() was ignored and we
checked an uninitialised value instead. Fixes#627. Based on patch
from Sergey Seroshtan.
Problem: When enum value contains compound expression with a char
constant, the quotes around char constant is missing in the generated
expression. Example:
enum media_type {
YUY2 = ((('2' << 24) | ('Y' << 16)) | ('U' << 8)) | 'Y'
};
The generated C# enum becomes:
public enum media_type {
YUY2 = (((2 << 24)|(Y << 16))|(U << 8))|Y
}
While the correct representation (after this fix) should be:
public enum media_type {
YUY2 = ((('2' << 24)|('Y' << 16))|('U' << 8))|'Y'
}
Causes: the exprcompound promotes the expression type from char to int
and uses $1.val in the generated expression. However $1.val does not
contain the quotes. Since the type is promoted to int, there's no way to
know there's char component in the compound expression.
Solution: in exprcomound, use $1.rawval if $1.type is T_CHAR or T_WCHAR.
The rawval contains quotes which yield correct expression.
Default hash is the underlying C/C++ pointer.
This matches up with testing for equivalence (Py_EQ in SwigPyObject_richcompare)
which compares the pointers.
* builtin-tweaks:
Python builtin minor tweaks
Cosmetic code formatting corrections
Further additional Python builtin slots as features for user customization
Add additional Python builtin slots as features for user customization
Correct notes on customising Python builtin comparison operators
Set tp_new statically rather than during initialisation
Customize slots tp_basicsize tp_methods tp_getset
Additional Python builtin slot overrides and slightly better formatted Python generated code
Add Python builtin tp_dealloc override test
Python getSlot() refactor
Add Python builtin closure method in comment
Update Python docs on builtin slots
Python builtin hashfunc closure fix
The following slots can now be overidden by users if they know what they
are doing:
- tp_dictoffset
- tp_init
- tp_new
- tp_as_number
- tp_as_sequence
- tp_as_mapping
- tp_as_buffer
* wkalinin-nested-ignore-fix:
renamed test module, in accordance with other tests
function body fixed
added foo() definition to satisfy some test linking fails
func() renamed to foo() for 'go'
fixed test-suite/nested_ignore.i
test for #662
fix for nested ignored types
Closes#662
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.