Commit graph

3,261 commits

Author SHA1 Message Date
Dan Williams
7bcf3ddc89 Remove gcc warnings when using -Wconversion. Right side of expressions are signed char. 2016-04-27 10:55:22 -04: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
William S Fulton
50fec04759 Support namespaces and nspace with the interface feature for Java 2016-02-26 18:17:14 +00:00
William S Fulton
1737fc9b9b Add Java premature garbage collection prevention parameter (pgcpp) to interface feature
pgcpp was turned off but it is still needed for the interface feature
to prevent premature garbage collection of the proxy class being passed
into the C++ layer.
2016-02-24 08:30:10 +00:00
William S Fulton
e7bb3afa0c Create javainterfacecode and csinterfacecode typemaps
The interface feature is no longer hard coded and can
be controlled by a user via these new typemaps.
2016-02-23 07:30:00 +00:00
Olly Betts
611bbe7ddf [Python] Add missing keywords 'as' and 'with' to pythonkw.swg. 2016-02-17 14:19:08 +13:00
Olly Betts
c2228de096 Replace dead URLs with working equivalents 2016-02-17 14:18:21 +13:00
Vladimir Kalinin
1ba81241d7 IntPtr & HandleRef absolute names used 2016-02-14 03:09:12 +03:00
Johan Gustavsson
628e9a79f6 swiglabels.swg: added check if __GNUC__ is defined
It makes sense to check if the preprocessor definition __GNUC__ is defined before using it as a value.
2016-02-13 13:49:07 +01:00
Vladimir Kalinin
5768d87deb director generation fixes
Conflicts:
	Lib/java/feature_interface.i
	Source/Modules/csharp.cxx
	Source/Modules/java.cxx
2016-02-12 07:09:17 +00:00
William S Fulton
abccc13a4a Merge branch 'interfaces' into interfaces2
* interfaces:
  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:
	Source/Modules/csharp.cxx
	Source/Modules/java.cxx
2016-02-11 19:37:31 +00:00
William S Fulton
f82efac231 interface macro changes to support templates
The C++ type must be last in the argument list to support templates with
multiple arguments which are separated by commas.
Affects DECLARE_INTERFACE and DECLARE_INTERFACE_RENAME.
2016-02-09 07:02:42 +00:00
William S Fulton
72e5c221b6 Rename GetCPtr/getCPtr to SWIGInterfaceUpcast
This is then similarly named to other similar functions:
SWIGUpcast and SWIGSmartPtrUpcast
2016-02-08 20:49:46 +00:00
Karl Wette
125329466d octave: map unary functions to __...___ Python-style unary members
- Only available in Octave 3.8.0 and higher
2016-02-07 20:22:39 +01:00