Commit graph

3,275 commits

Author SHA1 Message Date
William S Fulton
db54a8d5d1 Fix unused warnings in perl wrappers 2016-05-28 09:59:16 +01:00
William S Fulton
624195f313 Fix unused variable warnings in Guile wrappers 2016-05-28 00:45:24 +01:00
William S Fulton
06c47fbcdc Correct file format to unix 2016-05-28 00:45:24 +01:00
William S Fulton
ff21a0bca9 Remove unused variables from C# boost::intrusive_ptr wrappers 2016-05-28 00:45:24 +01:00
William S Fulton
7ead141aa9 Fix unused variable warning in Perl wrappers 2016-05-28 00:45:24 +01:00
William S Fulton
763827c2e1 Ruby opaque pointer handling regression fix
This bug was introduced in swig-3.0.8 in #146252 adding shared_ptr
support. An ObjectPreviouslyDeleted error was incorrectly thrown
when the pointer was used as a parameter after being set to zero
via a call to 'DATA_PTR(self) = 0'.

It isn't clear to me which approach is better in this corner case,
so I've gone for backwards compatibility and restored the old behaviour.

Closes #602
2016-05-24 19:09:17 +01:00
William S Fulton
98a31ff633 Fix directorin SWIGTYPE typemaps to make a copy as these are used for pass by value.
Closes #434
2016-05-14 21:32:24 +01:00
joequant
8890a675f7 Merge pull request #663 from richardbeare/RVectorRefsRebase
R vector refs rebase
2016-05-13 04:33:41 +08:00
William S Fulton
5e6ab1d61d Merge branch 'ejulien-python_operator_overload_test_suite'
* 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
2016-05-05 23:01:35 +01:00
Dan Williams
7bcf3ddc89 Remove gcc warnings when using -Wconversion. Right side of expressions are signed char. 2016-04-27 10:55:22 -04:00
Richard Beare
85f0930f73 cleaned up constants 2016-04-21 18:11:56 +10:00
Richard Beare
3f75b2917d R delete an old trace statement 2016-04-19 14:41:26 +10:00
Richard Beare
1403610518 Missing definitions for vector references 2016-04-19 14:26:37 +10:00
Ian Lance Taylor
9cd3e28c4e [Go] Fix "in" typemap for char *&. 2016-04-17 22:20:28 -07:00
Ian Lance Taylor
223c2a4835 [Go] Fixes for Go 1.6: avoid returning Go pointers from
directors that return string values; add a trailing 0 byte
when treating Go string as C char*.
2016-04-17 17:52:09 -07:00
joequant
bddf4892c4 Merge pull request #645 from richardbeare/RCharacterVectorSupport
R character vector support
2016-04-12 19:33:34 +08:00
Simon Marchetto
9f4ad6e7dc scilab: fix pointer type name 2016-04-06 13:22:59 +02:00
Richard Beare
f7b794a4f3 run test and copying typemaps to std::string 2016-04-05 10:06:42 +10:00
Richard Beare
720c4d3dfc added R string vector to C++ std::vector of strings 2016-04-05 09:39:47 +10:00
William S Fulton
a15bbbaee5 Java - unsigned long long marshalling improvements for negative numbers
Affects marshalling of negative numbers from Java to C only.
A cast to signed long long in the C layer will now result in the expected value.

Closes #623.
2016-03-31 18:56:32 +01:00
William S Fulton
8322686e84 Cosmetic java typemap cleanup 2016-03-31 18:56:32 +01:00
joequant
7e3165848b Merge pull request #633 from sbpcs59/master
Suppress unmessage at package load
2016-03-26 13:20:38 +08:00
Paweł Tomulik
350d43d988 handle const pointers to functions 2016-03-24 10:59:23 +01:00
William S Fulton
d98f7050a0 Merge branch 'alexwarg-fix-lua-getitem'
* alexwarg-fix-lua-getitem:
  Add test case for Lua __getitem + inheritance
  Fix lua base class methods with __getitem
2016-03-22 20:44:12 +00:00
William S Fulton
d05160afd2 Merge branch 'smarchetto-master' (Scilab test-suite fixes)
* smarchetto-master:
  Scilab Travis testing working again
  scilab: fix warnings
  scilab: fix compilation error (no return in SWIG_CheckPtr())
2016-03-17 19:39:23 +00:00
Alexander Warg
4363160400 Fix lua base class methods with __getitem
When a C++ class defined a __getitem function the base classes where
never used for resolving methods. This fix first scans the '.get' and
'.fn' tables of all base classes and only if there is no result does the
same for __getitem functions.
2016-03-17 07:46:44 +01:00
joequant
6212800fe3 Merge pull request #636 from richardbeare/RExtraStdVectorNumericTypes
R extra std vector numeric types
2016-03-16 18:55:58 +08:00
Richard Beare
0821ec0b45 Support for more numeric types in std::vector for R.
This change allows R to automatically convert std::vectors of
signed and unsigned 8, 16, 32 and 64 bit integer types.

rtype, rtypecheck, scoercein and scoerceout typemaps are copied
across integer types.
2016-03-15 12:03:25 +11:00
William S Fulton
870b814f5e Add C++11 std::array container support for Java 2016-03-14 20:46:56 +00:00
Simon Marchetto
2e556a4cda scilab: fix warnings 2016-03-14 17:49:05 +01:00
Simon Marchetto
46a8acb538 scilab: fix compilation error (no return in SWIG_CheckPtr()) 2016-03-14 17:42:04 +01:00
William S Fulton
0f0345c214 Merge branch 'interfaces'
* interfaces:
  Documentation and CHANGES entry for interface feature
  interface macro argument name tweaks
  Change the name of the interface in %feature to be more portable
  Interface feature fix for typedef types
  Add limited support for %interface_impl and %shared_ptr
  Multiple inheritance warning wording tweak
  C# "override" fix for "extend" case
  Add checks for interface name symbol clashes
  interface feature test changes for the tests to pass for all languages
  Rename feature_interface.i to swiginterface.i
  Re-organization of the interface feature common code
  Port Java interface tests to C#
  Test %interface
  Test %interface_impl
  Use rstrip instead of regex encoder in %feature_rename
  Add rstrip encoder for use in %rename.
  Interface macros: %interface %interface_impl %interface_custom
  Add $interfacename family of special variable expansions
  Add multiple_inheritance_nspace testcase
  Interface name handling improvements and special variable changes
  Correct regex example comment
  Properly hide unexposed naming functions in naming.c
  C++ namespace testing for interface feature
  interface feature - SWIG_JAVABODY_PROXY does not need to be overridden
  Support namespaces and nspace with the interface feature for C#
  Support namespaces and nspace with the interface feature for Java
  Cosmetic test case changes
  Add Java premature garbage collection prevention parameter (pgcpp) to interface feature
  Create javainterfacecode and csinterfacecode typemaps
  IntPtr & HandleRef absolute names used
  virtual/override fix
  Improve interface feature checks
  Add another interface test selecting just one base as an interface
  Comments added to interface feature implementation and cosmetic code changes
  Add overloading tests for interface feature
  Refactor multiple inheritance warnings
  director generation fixes
  interface feature updates for C# latest on master
  interfaces branch merge fixes
  Remove unnecessary interfaces for concrete classes
  cosmetic code formatting changes
  Correct interface name attributes that are internal
  interface macro changes to support templates
  Test non-virtual method in Derived classes
  interface tests for a most derived class inheriting the interfaces further up the chain
  Rename GetCPtr/getCPtr to SWIGInterfaceUpcast
  interface feature support for const ref pointers (used by the STL)
  Interface feature support for arrays
  More interface feature testing for return values
  interface feature support for passing by value
  interface feature support for references
  Multiple inheritance parameters as pointers testing
  Simplify multiple_inheritance_abstract Java runtime test
  Warning fixes
  Rename test functions in multiple_inheritance_abstract testcase
  Formatting fixes in generated code for interface feature
  Cosmetic spacing changes in test case
  interface feature typemap corrections to handle NULL pointers
  interface test added
  javadirectorin fix
  interface implementation visibility
  interface inheritance (2)
  interface inheritance (1)
  feature:interface ported to Java
  propagate non-abstract "interface" base methods (3)
  propagate non-abstract "interface" base methods (2)
  propagate non-abstract "interface" base methods (1)
  namespace support added GetCPtr now returns HandleRef "feature:interface:name" is now mandatory attribute
  interfaces (1)
  interfaces (1)

Conflicts:
	CHANGES.current
2016-03-11 20:01:41 +00:00
William S Fulton
dc4e0ab0f6 interface macro argument name tweaks 2016-03-11 19:47:08 +00:00
simon
e2e06c0031 scilab: fix C90 non conformance 2016-03-11 18:03:32 +01:00
simon
1846dec899 scilab: remove debug stuff 2016-03-11 12:29:21 +01:00
sbpcs59
2ea53f2dd1 Suppress message at package load - Creating a generic function for ‘print’ from package ‘base’ in package <some package> 2016-03-10 20:29:15 -08:00
simon
b9bddada7a scilab: fix object/pointer type checking 2016-03-08 17:37:39 +01:00
simon
424bebb165 scilab: pointers are mapped as a tlist (instead of pointers) containing type info 2016-03-08 17:37:39 +01:00
William S Fulton
e1dfad1a3b Change the name of the interface in %feature to be more portable
Use SwigInterface as a suffix to the class name when naming the
interface class instead of using a simple I as a prefix.
%feature_custom can be used to use I as a prefix if so desired.
2016-03-08 08:42:16 +00:00
William S Fulton
5cf20086a4 Rename feature_interface.i to swiginterface.i 2016-03-03 08:55:20 +00:00
William S Fulton
7f3f8fd76a Use rstrip instead of regex encoder in %feature_rename
The regex encoder is not always available in SWIG builds.
2016-03-03 08:55:10 +00:00
simon
e5f4a60fbf scilab: fix indentation 2016-03-02 05:14:44 -05:00
simon
94a94edae4 scilab: fix scilab 6.0 beta1 compilation error 2016-03-02 05:14:44 -05:00
William S Fulton
3000824c94 Interface macros: %interface %interface_impl %interface_custom 2016-03-02 07:10:58 +00:00
Olly Betts
75510a121d [Python] Use std::isfinite() under C++11
Follow-up fix for https://github.com/swig/swigissues/615
2016-03-01 19:10:03 +13:00
Olly Betts
5733cc1d2a [Python] Fix isfinite() check to work with GCC6
Fixes https://github.com/swig/swig/issues/615 reported by jplesnik.
2016-03-01 15:26:33 +13:00
William S Fulton
14d2341512 Add $interfacename family of special variable expansions
This is a simple expansion expanding to the name of the interface and is
not qualified like $javainterfacename and $csinterfacename.
Expansion within typemaps is much like $javainterfacename otherwise.
Note that expansion within the pure java code typemap,
'javainterfacecode' and similarly pure C# code typemap,
'csinterfacecode' works like $javaclassname/$csclassname and
$&interfacename should not be used, just $interfacename.
2016-02-29 21:18:42 +00:00
William S Fulton
c71dba5021 Interface name handling improvements and special variable changes
Support expansion of name attribute in: %feature("interface", name="%s")
%s expands to the proxy class name and all the usual %rename functions
can be used (regex, strip, camelcase etc) to derive the interface name
from the proxy class name.
Rename $interfacename family of special variables to $javainterfacename for Java
Rename $interfacename family of special variables to $csinterfacename for C#
This is to free up $interfacename for simple interface name expansion in forthcoming commit
2016-02-29 20:18:01 +00:00
William S Fulton
3b8f00f774 interface feature - SWIG_JAVABODY_PROXY does not need to be overridden 2016-02-26 18:17:20 +00:00
William S Fulton
2f1c34be58 Support namespaces and nspace with the interface feature for C# 2016-02-26 18:17:20 +00:00