Commit graph

21,579 commits

Author SHA1 Message Date
William S Fulton
ae1e736c1b Memory leak fix handling empty /// doxygen comments 2020-01-16 07:47:53 +00:00
William S Fulton
55d36e3fd3 Merge branch 'Issue-1632'
* Issue-1632:
  Minor workaround in doxygen_basic_translate_style3 test
  Add new test doxygen_basic_translate_style3.i
  Fix for newline handling in doxygen "///" style comments
2020-01-16 07:19:29 +00:00
William S Fulton
9cfeb592ed Remove unused import in java testcase 2020-01-15 22:17:18 +00:00
William S Fulton
d1a4174bf3 Fix deprecation warning in java testcase
Fixes:
./director_string_runme.java:53: warning: [deprecation] Integer(int) in Integer has been deprecated
2020-01-14 20:02:15 +00:00
William S Fulton
fa58fd53b4
Merge pull request #1656 from mcfarljm/Issue-1647
Fix doxygen crash with empty comment (Issue #1647)
2020-01-14 19:54:38 +00:00
William S Fulton
0b57b60aec Add changes entry for improved doxygen support 2020-01-14 18:56:38 +00:00
William S Fulton
af504ccddd Update newly merged doxygen Java test for Java 9 API
See 66a7826192
2020-01-14 18:43:58 +00:00
William S Fulton
00b47d4d1d Merge branch 'doxy/commands'
* doxy/commands:
  Update documentation for doxygen tags
  Fix doxygen translation of \p command for python
  Fix doxygen handling of \em tag for python
  Minor formatting updates to doxygen docs
  Reformat tag lists in doxygen documentation
  Add doxygen_code_blocks_runme.java
  Special handling for python doctest code blocks
  Add new doxygen test doxygen_code_blocks
  Handle doxygen code command with language option
  Improve doxygen parser handling of \code content
  Flag optional arguments in doxygen pydoc output
  Add parameter direction to doxygen pydoc output
  Support doxygen \param[] commands
2020-01-14 18:36:50 +00:00
William S Fulton
5ce839932c Merge branch 'OCaml-caml_named_value-const'
* OCaml-caml_named_value-const:
  [OCaml] Fix compilation errors with OCaml 4.09.0
2020-01-13 19:46:29 +00:00
William S Fulton
3759fcf999 Merge branch 'builtin-ctor-kwargs'
* builtin-ctor-kwargs:
  Python -builtin constructors silently ignored keyword arguments.
2020-01-13 19:29:47 +00:00
William S Fulton
67e8334ac8 Python -builtin constructors silently ignored keyword arguments.
Instead of silenty ignoring them, now a "TypeError: f() takes no keyword arguments"
exception is thrown if keyword arguments are used. Hence constructors and normal
methods/functions behave in the same way.

Closes issue #1595
2020-01-13 19:26:22 +00:00
William S Fulton
666752d521 Test multiple versions of D on Travis.
2.081 is reportedly broken and 2.086 was tested and fixed in #1594.
2020-01-07 18:59:17 +00:00
William S Fulton
37997e26ce Test Python 3.8 on Travis 2020-01-06 19:41:32 +00:00
William S Fulton
bc39311cc9 Add changes entry for missing python 3.8 field initializers 2020-01-05 22:45:16 +00:00
William S Fulton
489629fd53 Python 3.8 builtin tp_print initializer
Add missing initializer for tp_print added in python-3.8
when using -builtin

Issue #1670
2020-01-05 22:40:41 +00:00
William S Fulton
b7dec23121 Merge branch 'python38'
* python38:
  Adding tp_vectorcall field to PyTypeObject for Python version 3.8
2020-01-05 22:01:51 +00:00
William S Fulton
be5dbc2bf8 Merge branch 'py38_initializer'
* py38_initializer:
  Fix missing-field-initializers warning with Py3.8
2020-01-05 21:48:51 +00:00
William S Fulton
dca59bb5f7 Add changes entry for Octave swig_this() fix for Windows 64bit 2020-01-05 11:14:16 +00:00
William S Fulton
40ec65ae5e Merge branch 'octave_swig_this'
* octave_swig_this:
  Changed return type of swig_this() to size_t.
2020-01-05 11:03:51 +00:00
William S Fulton
6c476ba3cf Ruby 2.7 support 2020-01-05 10:38:15 +00:00
William S Fulton
f7f6aa2ff5 Merge branch 'ruby2.7-support'
* ruby2.7-support:
  Improve description of cast macros for Ruby
  Move new macros for Ruby to their dedicated namespace
  Add support for Ruby 2.7
2020-01-05 10:28:39 +00:00
Alexander Shadchin
eaa16914d1 Adding tp_vectorcall field to PyTypeObject for Python version 3.8 2020-01-05 03:32:10 +03:00
Thomas Reitmayr
f5908eca76 Improve description of cast macros for Ruby
The macros for casting function pointers are now fully described and also
clarify why the macros act transparently for C even before Ruby 2.7.

In addition, an "if (CPlusPlus)" was removed in the code generator for
global variables in order to keep the distinction between C and C++ in
one place, which is at the definition of said macros.
2020-01-04 18:37:35 +01:00
Thomas Reitmayr
5542cc228a Move new macros for Ruby to their dedicated namespace 2020-01-03 21:45:53 +01:00
Thomas Reitmayr
00e291b319 Add support for Ruby 2.7
This commit fixes the signatures of various callback methods
and cleans up the macro definitions used for casting callbacks.

Note that the transparent version of the macro RUBY_METHOD_FUNC
is currently masked behind RUBY_DEVEL, see commit
1d91feaf13
In order to still support strict signature checking and prevent
nasty deprecation warnings, the use of RUBY_METHOD_FUNC had to
be replaced with VALUEFUNC.
2019-12-31 17:53:53 +01:00
William S Fulton
9d1244c712 Add changes entry for Ruby -globamodule fix 2019-12-30 23:52:39 +00:00
William S Fulton
558f0ba485 Ruby globalmodule variables test enhancement
Check that the variables values are as expected in C++.
Note that the check_values global function is global in Ruby when
using -globalmodule.
2019-12-30 23:52:02 +00:00
William S Fulton
d53a54b4f7
Merge pull request #1668 from treitmayr/master
Fix code generated for Ruby global variables
2019-12-30 23:49:04 +00:00
William S Fulton
5259082cb1 Test Ruby 2.7 on Travis
Generated code does not yet compile, so set as allow_failure for now
rvm master currently needs to be installed when testing ruby-2.7 on Travis
2019-12-30 23:17:35 +00:00
Zackery Spytz
02862fb278 [OCaml] Fix compilation errors with OCaml 4.09.0
caml_named_value() was modified to return a const value* in OCaml
4.09.0.

Closes #1686.
2019-12-29 22:41:43 -07:00
Markus Friedrich
a2d9a24f4d Changed return type of swig_this() to size_t.
The type long may be 4 bytes but swig_this() must return the address of
the object as an integer. Using size_t ensures that the return type can
store a pointer.
2019-12-24 14:06:25 +01:00
Vadim Zeitlin
e7d0533a6f Quote JAVAC expansion in configure to deal with spaces
This avoids errors about unknown Java version format when JAVAC is in a
path with spaces in it (as is often the case under Windows).
2019-12-19 16:17:24 +01:00
Vadim Zeitlin
b52af40398 Disable Doxygen tests when using Java 8 or older
Check Java version in configure and define SKIP_DOXYGEN_TEST_CASES if
it's less than 9, which is required by the new implementation of
CommentParser used in the Doxygen tests.
2019-12-18 16:24:28 +01:00
Vadim Zeitlin
a271785f1a Revert "Remove Travis osx java testing"
This reverts commit 66752cde48 as Doxygen
tests do pass with Java 13 now.
2019-12-18 02:45:06 +01:00
Vadim Zeitlin
66a7826192 Rewrite Doxygen unit tests for Java using Java 9 API
In particular, do not use com.sun.javadoc deprecated since Java 9 and
finally removed in Java 13, to allow the tests to run under modern JRE.

They don't run under Java 8 and earlier any more, but this shouldn't be
a huge problem nowadays and as SWIG output is independent from the Java
version used, it's enough to test it with modern Java versions.

Note that the tests themselves were changed only in the most minimal
way, to adapt them to the new way of running javadoc (which is now also
integrated into CommentParser itself instead of being duplicated in
every test).
2019-12-18 02:45:06 +01:00
Vadim Zeitlin
5a8875ca9d Don't crash if unexpected comment is found in Java Doxygen tests
Don't pass null pointer to BufferedWriter.write(), as this results in
NullPointerException.
2019-12-18 02:26:03 +01:00
Vadim Zeitlin
fe6968e5e2 Reuse existing variable in CommentParser code used in Java tests
No real changes, just a tiny simplification.
2019-12-18 02:24:01 +01:00
William S Fulton
aa47b4c438 Fix some C++11 identifiers with special meaning parsing problems
Fix parsing of C++11 identifiers with special meaning (final and override) when
they are used as part of the scope name of an identifier, such as a namespace name.

Closes #1679
2019-12-10 19:26:05 +00:00
William S Fulton
66752cde48 Remove Travis osx java testing
Removed until doxygen testing is ported to something that doesn't use
com.sun.javadoc which was remoed in jdk 13
2019-12-04 20:08:41 +00:00
William S Fulton
8122929ba9 Improve .NET docs.
Add minimum .NET version required
Issue #1623
[skip-ci]
2019-12-04 07:06:58 +00:00
William S Fulton
3d98179fd3 Temporarily remove broken Appveyor Python3 testing 2019-11-26 19:45:08 +00:00
William S Fulton
18b2dcd222 C# 'out' or 'ref' removal improvements in director typemaps.
- Add support to DOH Replace for not replacing inside C comments
- Fix removing 'out' or 'ref' when these are present in C comments
  in cstype typemaps.

Closes #1628
2019-11-26 19:39:28 +00:00
William S Fulton
6fb345feb2 'out' or 'ref' usage in a cstype typemap in directors
'out' / 'ref' was not always stripped out in parts of the
director code generation.

Issue #1628
2019-11-26 19:32:34 +00:00
Julien Schueller
b536702c01 Fix missing-field-initializers warning with Py3.8
Python 3.8 adds tp_vectorcall, tp_print is added for compat just for 3.8
https://github.com/python/cpython/pull/13185/files#diff-b5db2632fa7acaf3b44abb56f18b9615
2019-11-20 15:40:52 +01:00
John McFarland
e46e1655cd Minor workaround in doxygen_basic_translate_style3 test
With the "///" doxygen comment style, comments within a code block do
not get handled correctly.  Modifying the test to remove this case and
adding a note about it for future reference.
2019-11-02 10:43:52 -05:00
John McFarland
feea39f352 Add new test doxygen_basic_translate_style3.i
This is used to test the "///" style of doxygen comments.  Previously,
newlines in these doxygen comments were not handled correctly.
2019-11-02 10:43:52 -05:00
John McFarland
b93597b63b Fix for newline handling in doxygen "///" style comments
Previously, the newlines in "///" doxygen comments were being stripped
out, resulting in incorrect translation of the comments for Python and
Java.  During scanning, "///" comments are processed line by line,
whereas "/*" style get processed as a block with newlines intact.

The fix checks for the "///" style in scanner.c and manually adds a
newline at the end of each comment line.  Some extra logic is also
added to properly handle empty "///" comments and ensure that a
newline gets added for those, which would otherwise be skipped.
2019-11-02 10:43:50 -05:00
William S Fulton
cb5d7398b5 Fix bug in Python builtin support for keyword args
The fix is when using kwargs feature or -keyword.
The fix is in the argument error checking when wrapping zero
argument constructors only. Supplied keyword args were silently
ignored.

Issue #1595
2019-11-01 19:46:42 +00:00
John McFarland
0f07a8a08d Fix doxygen crash with empty comment
Parsing "/**/" with -doxygen would result in a crash due to
calculation of comment start/end that does not work for an empty
comment.  Fixed by catching this case prior to processing.  Added
simple regression test to doxygen_basic_translate.
2019-10-30 08:15:18 -05:00
Thomas Reitmayr
18a3ef3911 Fix code generated for Ruby global variables
This commit fixes swig#1653 by creating a Ruby virtual variable
for a C/c++ global variable when SWIG is invoked with the
-globalmodule option.
2019-10-27 21:41:03 +01:00