Commit graph

391 commits

Author SHA1 Message Date
William S Fulton
7268f58c4c Fix %rename override of wildcard %rename for templates
%rename(GlobalIntOperator) *::operator bool; // wildcard %rename
%rename(XIntOperator) X::operator bool; // fix now overrides first %rename above
OR
%rename(XIntOperator) X<int>::operator bool; // fix now overrides first %rename above

template<typename T> struct X {
  operator bool();
  ...
};
%template(Xint) X<int>;
2016-11-28 22:50:52 +00:00
William S Fulton
5df10e380e Fix some test-suite warnings 2016-10-16 19:10:35 +01:00
William S Fulton
b9ca9f5efc Smart pointer to %ignored class doesn't expose inherited methods fix.
Regression introduced in swig-3.0.9 by 3efdbc8
Closes #690
2016-05-31 22:10:37 +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
William S Fulton
57f1c378b2 Remove JNI checks due to numerous spurious warnings in some versions of jdk-1.8
Was happening with openjdk-1.9 on Ubuntu 16.04 Xenial Xerus and also seen in jdk-1.8 on Fedora 23 (jdk-1.8.0_65-b17)
2016-05-01 17:35:55 +01:00
William S Fulton
cc15fcebd0 Fix java testcase for jdk-1.9
Package.getName() returns an empty string instead of null in jdk-1.9
exposing bug in use of replaceAll whose 1st arg is a regex expression.
2016-05-01 16:32:15 +01: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
Paweł Tomulik
174523aa80 fix handling of function pointers by %constant directive 2016-03-24 11:22:51 +01:00
William S Fulton
5a4291911e Correct Java runtime test 2016-03-14 20:54:21 +00:00
William S Fulton
870b814f5e Add C++11 std::array container support for Java 2016-03-14 20:46:56 +00: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
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
2dec8c5514 Add limited support for %interface_impl and %shared_ptr 2016-03-06 21:20:23 +00:00
William S Fulton
5d58de60d6 interface feature test changes for the tests to pass for all languages 2016-03-03 19:45:00 +00:00
William S Fulton
4fb364744d Test %interface 2016-03-03 08:55:20 +00:00
William S Fulton
0bf4e965a6 Test %interface_impl 2016-03-03 08:55: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
31b22ff6ac Cosmetic test case changes 2016-02-26 07:35:18 +00:00
William S Fulton
819bd9c97e Duplicate tests that are run twice as both C and C++ tests to fix parallel make: li_cdata 2016-02-21 18:04:04 +00:00
William S Fulton
9600c95234 Duplicate tests that are run twice as both C and C++ tests to fix parallel make: li_carrays 2016-02-21 18:04:04 +00:00
William S Fulton
67f38e8124 Add another interface test selecting just one base as an interface 2016-02-12 22:38:58 +00:00
William S Fulton
d0fb0ae801 Add overloading tests for interface feature 2016-02-12 20:22:37 +00:00
William S Fulton
212300c62b interfaces branch merge fixes 2016-02-11 20:21:25 +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
3931b5800c Remove unnecessary interfaces for concrete classes
Add Java test for checking expected base and interfaces are generated (to be expanded further)
In the example, E was previously implementing IA, IB, IC. Now it doesn't implement any.
C# virtual/override still to be fixed for this test case
2016-02-10 20:54:39 +00:00
William S Fulton
8c49741eb2 interface tests for a most derived class inheriting the interfaces further up the chain 2016-02-08 20:49:57 +00:00
William S Fulton
e8907132cc interface feature support for const ref pointers (used by the STL)
Also interface feature return by value fixes
2016-02-07 13:58:47 +00:00
William S Fulton
5572b5f035 More interface feature testing for return values 2016-02-06 20:15:47 +00:00
William S Fulton
a1f2d60535 interface feature support for passing by value
Also add in missing $owner for governing ownership when returning pointers and references
2016-02-06 20:15:40 +00:00
William S Fulton
3eec3e2ea5 interface feature support for references 2016-02-06 20:15:29 +00:00
William S Fulton
eb15ba1638 Multiple inheritance parameters as pointers testing 2016-02-06 16:34:33 +00:00
William S Fulton
cb65828310 Simplify multiple_inheritance_abstract Java runtime test 2016-02-06 16:34:33 +00:00
William S Fulton
7379ea7848 Rename test functions in multiple_inheritance_abstract testcase
new names are just more friendly for analysing the test
2016-02-06 16:34:33 +00:00
William S Fulton
a16a818523 Cosmetic spacing changes in test case 2016-02-05 20:20:39 +00:00
William S Fulton
350eff3687 Director smartptr testing
- Enhance Java and C# test
- Add Ruby test
2015-09-30 07:53:19 +01:00
Vadim Zeitlin
a1bddd56eb Make (char*, size_t) typemap usable for strings of other types in Java.
Notably it now works for "unsigned char*" strings.

Add a test to check that it now works in Java and also showing that it already
worked for the other languages with support for this typemap.
2015-08-07 19:44:45 +02:00
Lindley French
94f683868a Enable variable and typemap substitution in typemap kwargs, and a test that verifies this works for directorin:descriptor. 2015-07-22 11:31:21 -07:00
William S Fulton
3718b810c7 Don't generate constructor wrappers if a base class has a private constructor
g++-5 errors out with this now with errors such as:

default_constructor_wrap.cxx:665:27: error: use of deleted function ‘FFF::FFF()’
   result = (FFF *)new FFF();
                           ^
default_constructor_wrap.cxx:314:7: note: ‘FFF::FFF()’ is implicitly deleted because the default definition would be ill-formed:
 class FFF : public F {
       ^
default_constructor_wrap.cxx:301:4: error: ‘F::~F()’ is private
    ~F() { }
    ^
default_constructor_wrap.cxx:314:7: error: within this context
2015-07-07 20:15:55 +01:00
William S Fulton
d325eeee84 Fix incorrect test case code 2015-07-06 19:50:22 +01:00
William S Fulton
e543299d97 Fix array overrun in li_carrays testcase 2015-07-04 20:53:49 +01:00
William S Fulton
117f6d0026 Fix C++11 type aliasing seg fault.
Closes #424
2015-06-09 07:59:22 +01:00
William S Fulton
54e2317b24 Fix shared_ptr of classes with private constructors and destructors.
Usually these use a custom deleter passed to the shared_ptr.
This also fixes the "unref" feature when used on classes with private destructors.
2015-05-14 19:03:06 +01:00
William S Fulton
6c1630b152 Fix Java multi-argument typemaps (char *STRING, size_t LENGTH)
Now they can be applied to a wider range of types.
Closes #385.
2015-05-10 13:35:51 +01:00
Olly Betts
8fc7796643 Merge pull request #403 from LindleyF/master
Zero-initialize swig_override in the director constructor.
2015-05-07 13:26:04 +12:00
William S Fulton
428b6176df Add support for friend templates, including operator overloading.
Closes #196.
2015-05-05 06:48:25 +01:00
Lindley French
3ce7867a0a Added missing untracked files. 2015-05-04 15:27:51 -07:00
William S Fulton
21b176f07f Fix preproc_line_file test 2015-01-26 22:35:17 +00:00
William S Fulton
ee35389d22 Fix abort using template default parameters
Closes #280
2014-12-28 10:39:53 +00:00
William S Fulton
5c57a8c877 Warning suppressions in tests 2014-12-22 20:35:13 +00:00
William S Fulton
68a936a638 Add testcase for nested inner class deriving from a templated base class and defined outside of the outer class.
For languages that don't support nested class support, use flatnested.
See issue #270
2014-12-19 19:35:38 +00:00