Commit graph

5,000 commits

Author SHA1 Message Date
Zackery Spytz
e4759ae250 C++17 u8 character literals testcase
Issue #1450
2019-02-10 15:53:42 +00:00
Zackery Spytz
b00ee788a2 Fix the Java tests
"uchar" and "Uchar" will both generate a getUchar() getter.
2019-02-06 09:53:37 -07:00
Zackery Spytz
8c2cb4e604 Add support for the C++11 u and U encoding prefixes for char literals
"u" and "U" are new in C11 and C++11 for char literals.
2019-02-05 15:08:35 -07:00
William S Fulton
09e0577d95 Disable Chicken target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:42:12 +00:00
William S Fulton
cb4bd26422 Disable Common Lisp / CLISP target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:42:07 +00:00
William S Fulton
f63d0db21b Disable Common Lisp / UFFI target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:41:54 +00:00
William S Fulton
8aa4086136 Disable Pike target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:41:46 +00:00
William S Fulton
ee3aeb8177 Disable Modula3 target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:41:34 +00:00
William S Fulton
02c9990ff9 Run multicpptests in alphabetical order 2019-02-03 00:28:02 +00:00
William S Fulton
1e2190e6b8 Merge branch 'ahnolds-autodoc'
* ahnolds-autodoc:
  Apparently nicely lining things up violates pep8, so don't try
  Don't use bool in the generated files for C compatability
  Properly handle destructors as methods for autodoc and fix some stray newlines
  Fixing a bug where the cached doxygen docstring could be deleted while still in use, causing swig to segfault
  Fixing docstrings for variables and static functions for consistency
  Fixes so that fastproxy and autodoc work correctly with both low-level C API and high-level Python Shadow API
  Updating the changelog
  Also check documentation on the low-level API
  Fix a bug where anonymous arguments were misnumbered when used in constructors
  Fixing python docstring handling for -fastproxy

Conflicts:
	CHANGES.current
2019-02-02 21:39:48 +00:00
William S Fulton
50a80e6ee3 Add a testcase for testing %native 2019-01-31 23:01:42 +00:00
William S Fulton
054a85c546 Merge branch 'ZackerySpytz-OCaml-char_binary-test'
* ZackerySpytz-OCaml-char_binary-test:
  [OCaml] Fix the char_binary test for OCaml
2019-01-31 07:35:11 +00:00
William S Fulton
528f33e9e5 Merge branch 'ZackerySpytz-OCaml-eliminate-wno-write-strings'
* ZackerySpytz-OCaml-eliminate-wno-write-strings:
  [OCaml] Remove support for OCaml versions < 3.12.0
  [OCaml] Fix toplevel creation for ocamlmktop versions >= 4.04.0
  [OCaml] Eliminate use of -Wno-write-strings
2019-01-31 07:29:09 +00:00
William S Fulton
280ce63100 Merge branch 'ZackerySpytz-OCaml-template_opaque-using_extend-runtime-tests'
* ZackerySpytz-OCaml-template_opaque-using_extend-runtime-tests:
  [OCaml] Runtime tests for template_opaque, using_extend and some others
2019-01-31 07:25:11 +00:00
William S Fulton
526b2cf0ae Merge branch 'ZackerySpytz-OCaml-director-classes-throw'
* ZackerySpytz-OCaml-director-classes-throw:
  [OCaml] Fix handling of exception specifications for director classes
2019-01-31 07:21:50 +00:00
William S Fulton
2b788c47fa Merge branch 'ZackerySpytz-OCaml-inctest-li_cpointer_cpp-runtime-tests'
* ZackerySpytz-OCaml-inctest-li_cpointer_cpp-runtime-tests:
  [OCaml] Runtime tests for inctest, li_cpointer_cpp and some others
2019-01-31 07:15:03 +00:00
Zackery Spytz
85860c0a61 [OCaml] Fix the char_binary test for OCaml
Add %typemap(in) (char *STRING, size_t LENGTH).

Fix warnings in char_binary.i.

./../char_binary.i:7: Warning 453: Can't apply (char *STRING,size_t LENGTH). No typemaps are defined.
./../char_binary.i:8: Warning 453: Can't apply (char *STRING,size_t LENGTH). No typemaps are defined.

Add a runtime test (it is based on the Python and Go char_binary
runtime tests).
2019-01-29 09:18:30 -07:00
Zackery Spytz
f78358d9aa [OCaml] Runtime tests for template_opaque, using_extend and some others
Add runtime tests for namespace_virtual_method, template_opaque,
using_extend, using_inherit, using_pointers, using_private, and
varargs_overload.
2019-01-27 06:50:51 -07:00
Alec Woods
98023054c6 Properly handle destructors as methods for autodoc and fix some stray newlines 2019-01-26 09:30:26 -05:00
Alec Woods
5106573b29 Fixing docstrings for variables and static functions for consistency 2019-01-26 09:30:26 -05:00
Alec Woods
86e08c8e34 Fixes so that fastproxy and autodoc work correctly with both low-level C API and high-level Python Shadow API 2019-01-26 09:30:26 -05:00
Alec Woods
fb58727135 Also check documentation on the low-level API 2019-01-26 09:30:26 -05:00
Alec Woods
591a70378e Fixing python docstring handling for -fastproxy 2019-01-26 09:30:26 -05:00
Zackery Spytz
35663b1622 [OCaml] Fix handling of exception specifications for director classes
The OCaml module was generating invalid code for director classes
which contain methods with exception specifications. The fix is based
on some of the code in python.cxx's classDirectorMethod().

This commit fixes compilation failures for a number of director unit
tests.

Add director_exception_catches_runme.ml,
director_exception_nothrow_runme.ml, and director_ignore_runme.ml.
2019-01-26 05:58:38 -07:00
Zackery Spytz
25e650e7d8 [OCaml] Fix toplevel creation for ocamlmktop versions >= 4.04.0
The -o and -c options of ocamlc/ocamlopt were modified to be stricter
in 4.04.0.
da56cf6dfd

The changes in Examples/Makefile.in are compatible with earlier OCaml
versions (at least back to 3.12.0).
2019-01-25 01:58:48 -07:00
Zackery Spytz
4ca7cd7b27 [OCaml] Eliminate use of -Wno-write-strings
Don't convert string literals to char * in the strings_test example.

In constantWrapper(), use SwigType_str() instead of SwigType_lstr()
in order to keep const qualifiers.
2019-01-24 05:32:35 -07:00
Zackery Spytz
4d54d305fc [OCaml] Runtime tests for inctest, li_cpointer_cpp and some others
Add runtime tests for inctest, li_cpointer_cpp, newobject2,
special_variables, special_variable_macros, template_extend1, and
template_extend2.
2019-01-22 22:50:40 -07:00
Zackery Spytz
4074f788b3 [OCaml] Fix %allowexception
OCaml's variableWrapper() wasn't calling emit_action_code() for
in/out typemaps, which meant that %allowexception was being ignored.

In addition, remove all comments in the typemaps in Lib/ocaml. In the
case of the allowexcept test, one of the typemap comments caused
compilation to fail because it became nested within another comment
in an %exception block.

Re-enable the allowexcept test.
Add allowexcept_runme.ml.
2019-01-22 07:51:45 -07:00
William S Fulton
a873d3810e Merge branch 'ZackerySpytz-OCaml-overload_numeric-warnings'
* ZackerySpytz-OCaml-overload_numeric-warnings:
  [OCaml] Some %typecheck precedence tweaks
2019-01-22 08:12:54 +00:00
William S Fulton
d02f65e26a Merge branch 'ZackerySpytz-OCaml-overload_method-typedef_class-runtime-tests'
* ZackerySpytz-OCaml-overload_method-typedef_class-runtime-tests:
  [OCaml] Runtime tests for overload_method, typedef_class and some others
2019-01-22 08:10:02 +00:00
Zackery Spytz
d5afcab9a6 [OCaml] Some %typecheck precedence tweaks
Fix warnings in overload_numeric.i.

./../overload_numeric.i:36: Warning 509: Overloaded method Nums::over(short) effectively ignored,
./../overload_numeric.i:33: Warning 509: as it is shadowed by Nums::over(signed char).
./../overload_numeric.i:39: Warning 509: Overloaded method Nums::over(int) effectively ignored,
./../overload_numeric.i:33: Warning 509: as it is shadowed by Nums::over(signed char).

Add overload_numeric_runme.ml.
2019-01-21 23:17:43 -07:00
Zackery Spytz
8b083b4284 [OCaml] Runtime tests for overload_method, typedef_class and some others
Add runtime tests for overload_method, typedef_class,
typedef_inherit, typemap_arrays, typemap_delete, types_directive, and
valuewrapper.
2019-01-20 23:08:03 -07:00
Vadim Zeitlin
1e22e791ef Always include default parameter values in Python autodoc strings
One of side effects of 15b369028f was that
the default values were only included in Python doc strings if we could
be sure that they could be interpreted as valid Python expressions, but
this change was actually undesirable as it may be useful to see C++
expression for the default value in the doc string even when it isn't
valid in Python.

Undo this part of the change and extend autodoc unit test to check that
this stays fixed.

Closes #1271.
2019-01-21 00:57:02 +01:00
William S Fulton
8587fd7b0d Merge branch 'ZackerySpytz-OCaml-overloaded-bools-typecheck'
* ZackerySpytz-OCaml-overloaded-bools-typecheck:
  [OCaml] Remove the last remnants of libswigocaml
  [OCaml] Fix the handling of bools in overloaded functions
2019-01-19 23:06:56 +00:00
William S Fulton
65cab79071 Merge branch 'ZackerySpytz-OCaml-dead-code-overloaded-funcs'
* ZackerySpytz-OCaml-dead-code-overloaded-funcs:
  [OCaml] Fix dead code generation in overloaded function wrappers
2019-01-19 23:03:07 +00:00
William S Fulton
88b83a3a75 Merge branch 'ZackerySpytz-OCaml-fvirtual-overload_polymorphic-runtime-tests'
* ZackerySpytz-OCaml-fvirtual-overload_polymorphic-runtime-tests:
  [OCaml] Runtime tests for fvirtual, overload_polymorphic and some others
2019-01-19 23:00:18 +00:00
William S Fulton
8e1893f355 D warning suppressions in autodoc testcase 2019-01-19 19:52:40 +00:00
William S Fulton
721f6ddef1 Add autodoc and keyword argument tests 2019-01-19 19:52:40 +00:00
William S Fulton
1329ed7a5c Suppress rename warnings when parameter names are keywords
Parameter renaming is not fully implemented. Mainly because there is no
C/C++ syntax to
for %rename to fully qualify a function's parameter name from outside
the function. Hence it
is not possible to implemented targetted warning suppression on one
parameter in one function.

Issue #1420
2019-01-19 19:52:34 +00:00
Zackery Spytz
b879ccdc3e [OCaml] Fix the handling of bools in overloaded functions
Use the SWIG_TYPECHECK_BOOL precedence level instead of
SWIG_TYPECHECK_INTEGER when checking for bools.

Add a runtime test in the form of overload_bool_runme.ml.
2019-01-18 23:42:59 -07:00
Zackery Spytz
f71ee5be67 [OCaml] Runtime tests for fvirtual, overload_polymorphic and some others
Add runtime tests for conversion, extend_typedef_class,
extend_constructor_destructor, fvirtual, overload_polymorphic,
template_rename, and using1.
2019-01-17 15:58:48 -07:00
William S Fulton
2e9b270cbb Merge branch 'vadz-better-param-names'
* vadz-better-param-names:
  Enable keyword arguments for keyword_rename unit test
  Update error messages test suite
  Add more tests for Python parameter renaming
  Improve handling parameters clashing with language keywords
2019-01-17 18:19:36 +00:00
Zackery Spytz
fa1a0a378c [OCaml] Fix dead code generation in overloaded function wrappers
The OCaml module was generating dead code in the wrappers for
overloaded functions. Only the generated dispatch function needs to
allocate an array for the passed arguments.

In addition, add overload_extend, overload_rename and overload_subtype
runtime tests.
2019-01-16 20:00:40 -07:00
Vadim Zeitlin
cb426b1074 Enable keyword arguments for keyword_rename unit test
This is required for the recently added Python test checking that an
argument clashing with a Python keyword is also renamed when using
keyword arguments and fixes this test failure when using -builtin Python
option.
2019-01-17 01:25:43 +01:00
William S Fulton
00fbf09137 Merge branch 'ZackerySpytz-OCaml-callback-example'
* ZackerySpytz-OCaml-callback-example:
  [OCaml] Add a callback example
2019-01-16 21:48:26 +00:00
William S Fulton
32a8cd8f2f Merge branch 'ZackerySpytz-OCaml-constant-char-wrapping'
* ZackerySpytz-OCaml-constant-char-wrapping:
  [OCaml] Fix the wrapping of static const member chars
2019-01-16 21:46:57 +00:00
William S Fulton
1bd1142d02 Fix python callback test-suite failure 2019-01-16 20:10:37 +00:00
Vadim Zeitlin
7e9181d70e Update error messages test suite
List the expected warnings about renaming "def" to "_def" too.
2019-01-16 18:52:19 +01:00
William S Fulton
cf1624ebc4 Python static method wrapper changes
- Static method wrappers were using the 'fastproxy' approach by default.
  This is inconsistent with instance method wrappers. The fastproxy approach
  is now turned off by default to be consistent with instance methods.
  Static method wrappers can now also be controlled using the -fastproxy and
  -olddefs options.

  Example:

    struct Klass {
      static int statmethod(int a = 2);
    };

  generates:

  class Klass(object):
      ...
      @staticmethod
      def statmethod(a=2):
          return _example.Klass_statmethod(a)

  instead of:

    class Klass(object):
      ...
      statmethod = staticmethod(_example.Klass_statmethod)

- Modernise wrappers for static methods to use decorator syntax - @staticmethod.

- Add missing runtime test for static class methods and using the actual
  class method.
2019-01-16 08:21:00 +00:00
Zackery Spytz
a641966e0b [OCaml] Add a callback example
It is based on the the Python and Go examples.
2019-01-16 00:53:13 -07:00