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.
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.
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.
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.
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).
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
- 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
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.
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.
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
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.
Processing doxygen @param comments for a parameter whose name did not
appear in the function declaration would cause a segfault due to a
null pointer dereference.
Adding test cases for both variadic function (no specified arguments)
and @param comment that references an argument that is not named in
the function prototype. Both of these cases previously segfaulted.
Updates to supported/unsupported doxygen tags for both Java and
Python. Document new support for \code and \param options. Also
update documentation of various other tags as well as the list of
unsupported tags for python.
Reformat the tables of unsupported and ignored tags. Previous table
format was not maintainable. Changing to use multi-column lists, so
that entries can be easily sorted and updated. The displayed order is
now by row instead of by column, which is decidedly easier to read.
Other than removing duplicates, no change to content.
Test of accessors generated via the new internal structures.
This test confirms that the old incorrect accessors are not
present and runs the correct version, confirming the values.