There is a possible memory leak in case the SWIG_exception_fail macro
is called. The problem is related to its definition that call the
function Rf_warning. This function (as well as Rf_error) involves
a longjmp over C++ destructors on the stack. Thus, all the objects
allocated on the heap are not freed.
Closes#914
Due to confusion in build_combined_docstring(), we could call
DohDelete() on the "feature:docstring" string, which resulted in a crash
when trying to use it later.
Fix this and simplify the code at the same time by ensuring that we
always use a copy of "feature:docstring" if it's not empty or don't use
it at all if it's empty -- like this we don't have to check for its
length each time before using it.
Closes#1648.
* RMemberListTrialSimplify2019:
ENH R abstract_access_runme
ENH R accessor processing test
Removed some remaining commented sections
moved registration routine and use swig_name_get
calling Swig_name_setget
Used Swig_name_register so that Swig_name_wrapper produces the correct name without a separate replace call.
Removed last instance of using Strcmp to check for a set/get method. Replaced with check for flag.
Alternative version of using memberlist processing. This clarifies the logic within OutputMemberReferenceMethod by filtering the lists into classes, rather than doing it internally. Code isn't any shorter.
commenting out unused code
first pass at removing string comparisons for set/get methods
trial changing member list processing
* shared-ptr-template-upcast:
comments
Applying shared_ptr template upcast fix to CSharp, adding CSharp test, and cleanup
Adding test case demonstrating issue where SWIG does not generate a correctly typed, upcasted shared_ptr for a template instantiation deriving from a base class
WIP - Use the non-encoded type string for upcasting a shared_ptr of a derived type to a shared_ptr of the base type
comments
Applying shared_ptr template upcast fix to CSharp, adding CSharp test, and cleanup
Adding test case demonstrating issue where SWIG does not generate a correctly typed, upcasted shared_ptr for a template instantiation deriving from a base class
WIP - Use the non-encoded type string for upcasting a shared_ptr of a derived type to a shared_ptr of the base type
* 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
* 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
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
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.
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
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.
* contrib/TekuConcept:
Dev Checkpoint 201908200213
Dev Checkpoint 201906261312
Dev Checkpoint 201906252227
Dev Checkpoint 201906252221
Dev Checkpoint 201906252210
Dev Checkpoint 201906252113
Add JS Native Directive Testcase
JS Example Campatibility Update
Add Native Directive Example
Update JavaScript Documentation
Add JS Native Wrapper API
A doctest code block begins with ">>>" and is not indented. Identify
these in doxygen comments and treat them accordingly. Also add check
to padCodeAndVerbatimBlocks for these because Sphinx requires an empty
line before.
Add test case to doxygen_code_blocks.i.
Previously, code blocks were always written to the pydoc output with
"code-block:: c++", and use of language options (e.g., \code{.py}) was
not supported. Now the option provided to the doxygen code command is
checked, and several basic cases are handled (python, java, and c),
defaulting otherwise to C++ as before (handling for additional cases
can easily be added).
Set the m_isVerbatimText flag in the parser for code commands. This
allows some additional special characters to appear within the code
block (in particular, the ">" character).
If the parameter has a default value, add the string ", optional" to
the parameter type description in the translated python comments.
Three examples with default values were already present in the test
cases, so their expected python output has been updated accordingly.
For doxygen comments that specify parameter direction (i.e.,
\param[in], \param[out], and \param[in,out]), the direction is
appended to the type definition in the generated Python documentation.
Updated expected python output for doxygen test case.
Recognize \param[in], \param[out], and \param[in,out]. Currently they
are all treated the same as \param, but the information is now
available for inclusion in the translated comments. This is done
using new utility functions getBaseCommand and getEndOfWordCommand,
which will also generalize to treatment of code command options,
e.g. \code{.py}. Preliminary treatment of the extended version of
\code is already in place in these functions.
Added examples of all three new \param commands to the
doxygen_translate_all_tags test and updated the python and java
expected output.
Fix regression in 4.0.0 where a template function containing a parameter
with the same name as the function name led to the parameter name used in the
target language being incorrectly modified.
Closes#1602