summaryrefslogtreecommitdiff
path: root/Examples
Commit message (Collapse)AuthorAgeFilesLines
* Add C# support for void *VOID_INT_PTR member variablesWilliam S Fulton2020-08-132-0/+10
| | | | Issue reported by Carlos Frederico Biscaya on swig-user mailing list.
* Add basic std::pair Python testingWilliam S Fulton2020-08-131-0/+47
| | | | Based on Ruby's li_std_pair_runme.rb
* Merge branch 'directors-comparison-operators'William S Fulton2020-06-144-0/+36
|\ | | | | | | | | | | * directors-comparison-operators: Use %rename Fix wrapping of virtual comparison operators with directors
| * Use %renameZackery Spytz2020-06-072-0/+8
| |
| * Fix wrapping of virtual comparison operators with directorsZackery Spytz2020-06-053-0/+28
| | | | | | | | Closes #1642.
* | Ruby testcase fixWilliam S Fulton2020-06-071-0/+2
| | | | | | | | | | | | | | | | Reportedly failing. Failure can be replicated with 2.5.1 by increasing number of loops. Workaround is to disable GC. Closes #1646
* | Merge branch 'python-doxygen-quotes'William S Fulton2020-06-073-0/+24
|\ \ | |/ |/| | | | | | | * python-doxygen-quotes: Fix generated Python code for Doxygen comments with triple quotes Fix generated Python code for Doxygen comments ending with quote
| * Fix generated Python code for Doxygen comments with triple quotesVadim Zeitlin2020-03-043-0/+16
| | | | | | | | | | | | | | | | In addition to the changes in the previous commit, also avoid syntax errors in the generated Python docstrings by splitting them into several parts if there are 3 quotes in a row in the input, as it's impossible to have them inside triple-quoted strings, generally speaking (i.e. if there are occurrences of both """ and ''' inside the string).
| * Fix generated Python code for Doxygen comments ending with quoteVadim Zeitlin2020-03-043-0/+8
| | | | | | | | | | | | Single-line Doxygen comments ending with a double quote resulted in syntactically-invalid Python docstrings in the output, so use triple single quotes as delimiters in this case to avoid it.
* | Merge branch 'r-script-fixes'William S Fulton2020-06-021-1/+1
|\ \ | | | | | | | | | | | | | | | * r-script-fixes: Fix further missing semicolons in R code. fixed some missing semicolons. Each one caused a compile error in generated code
| * | Fix further missing semicolons in R code.William S Fulton2020-06-021-1/+1
| |/ | | | | | | Fixes errors in R code when using -small as this option causes lines to be joined.
* | Octave: use pre-compiled headers to speed up test suite, if supportedKarl Wette2020-05-313-10/+53
| |
* | Merge pull request #1788 from mcfarljm/Issue-1757William S Fulton2020-05-284-5/+5
|\ \ | | | | | | Fix for missing space after \endlink in doxygen
| * | Fix for missing space after \endlink in doxygenJohn McFarland2020-05-024-5/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "endlink" command is processed in processWordCommands, which by default skips space occuring after the command, which is intended for removing leading space from a command argument. For "end" commands, we don't want to do this. Note that certain end commands such as "endcode" aren't processed by processWordCommands (believe addCommandUnique ends up handling them). Update usage of \link in doxygen_translate_all_tags.i to test handling of space after \endlink. Tweaking some of the usage in doxygen_misc_constructs.i to remove what seems to be an extra space from the input (otherwise we would need to add an extra space to the expected output).
* | Ignore ambiguous variable names error from pycodestyle 2.6Vadim Zeitlin2020-05-221-1/+1
|/ | | | | | | | | This error is given for any use of variable called "l" (and also "I" and "O", but we don't seem to have any of those) and it doesn't seem to be worth changing this variable name in the tests code, as it's really not that meaningful there anyhow, so just disable the warning to let the CI builds, which now use pycodestyle 2.6, instead of 2.5 which didn't have this error and which is still the latest available in Debian Sid, pass.
* Clean up test casesRyan Nevell2020-02-172-3/+4
|
* Fix unwrapping of LUA lightuserdata type. Add test case.Ryan Nevell2020-02-173-0/+24
|
* Merge branch 'abstract-conversion-operators'William S Fulton2020-02-142-0/+36
|\ | | | | | | | | | | * abstract-conversion-operators: Add test cases for abstract user-defined conversion operators Recognize C++ conversion operators with trailing '= 0' as abstract
| * Add test cases for abstract user-defined conversion operatorsThomas REITMAYR2020-02-132-0/+36
| |
* | Port Ruby test of vector<shared_ptr<>> to PythonWilliam S Fulton2020-02-131-0/+63
|/ | | | | | | | | | | | | This test code tests the upcast code: swig_assert_equal_simple(-1, base_num2([Derived(7)])) Although there is no explicit memory leak fix test, it does at least run the code. Handling of None needs fixing in Python (it is working in Ruby) Note that the Ruby implementation has a partial template specialization for shared_ptr, whereas the Python implementation is in the generic code! Issue #1512
* Fixing setting this in Python when using __slots__William S Fulton2020-02-062-1/+32
| | | | | | | | | | Don't attempt to use the class's __dict__ for setting 'this' when a user has extended a class with: __slots__ = ['this']. Was segfaulting. Now we fall back to a simple PyObject_SetAttr if the usual approach to setting 'this' in __dict__ does not work. Closes #1673 Closes #1674
* Disable GC checks for Ruby auto_ptr testWilliam S Fulton2020-01-311-28/+12
|
* Merge branch 'ruby-autoptr'William S Fulton2020-01-312-1/+44
|\ | | | | | | | | * ruby-autoptr: Extend std::auto_ptr<> support to Ruby
| * Extend std::auto_ptr<> support to RubyVadim Zeitlin2020-01-172-1/+44
| | | | | | | | | | | | This is trivial as exactly the same typemap as for Python can be used for Ruby too, all the differenced are abstracted by the unified typemap library.
* | Merge branch 'autodoc-doxygen-fix'William S Fulton2020-01-312-0/+11
|\ \ | | | | | | | | | | | | * autodoc-doxygen-fix: Fix crash in Python backend when using empty docstrings
| * | Fix crash in Python backend when using empty docstringsVadim Zeitlin2020-01-302-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Fix R memory leak on exceptionArnaud Barré2020-01-303-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge branch 'RMemberListTrialSimplify2019'William S Fulton2020-01-301-0/+74
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | ENH R abstract_access_runmeRichard Beare2019-08-311-3/+27
| | | | | | | | | | | | | | | | Improved the exception handling components of test.
| * | | ENH R accessor processing testRichard Beare2019-08-301-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Minor tweak to director_wstring_runme.py testWilliam S Fulton2020-01-281-2/+2
| |/ / |/| |
* | | Test shared_ptr upcasts in PythonWilliam S Fulton2020-01-241-0/+5
| | |
* | | Merge branch 'shared-ptr-template-upcast'William S Fulton2020-01-175-0/+129
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | commentsetse2019-05-061-3/+3
| | |
| * | Applying shared_ptr template upcast fix to CSharp, adding CSharp test, and ↵etse2019-05-063-4/+19
| | | | | | | | | | | | cleanup
| * | Adding test case demonstrating issue where SWIG does not generate a ↵etse2019-05-063-0/+114
| | | | | | | | | | | | correctly typed, upcasted shared_ptr for a template instantiation deriving from a base class
* | | Correct recently expanded testcase from a merge for doxygen default ↵William S Fulton2020-01-161-1/+1
| | | | | | | | | | | | parameter support
* | | Fix sort order of doxygen testcasesWilliam S Fulton2020-01-161-1/+1
| | |
* | | Update anther newly merged doxygen Java test for Java 9 APIWilliam S Fulton2020-01-161-10/+2
| | | | | | | | | | | | See 66a78261924174791a4952d05b58d52c16a36a57
* | | Merge branch 'Issue-1643'William S Fulton2020-01-163-0/+31
|\ \ \ | | | | | | | | | | | | | | | | * Issue-1643: Fix pydoc null pointer dereference with missing arg type
| * | | Fix pydoc null pointer dereference with missing arg typeJohn McFarland2019-10-273-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge branch 'Issue-1632'William S Fulton2020-01-164-0/+286
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | Minor workaround in doxygen_basic_translate_style3 testJohn McFarland2019-11-023-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Add new test doxygen_basic_translate_style3.iJohn McFarland2019-11-024-0/+279
| |/ / / | | | | | | | | | | | | | | | | This is used to test the "///" style of doxygen comments. Previously, newlines in these doxygen comments were not handled correctly.
* | | | Remove unused import in java testcaseWilliam S Fulton2020-01-151-1/+0
| | | |
* | | | Fix deprecation warning in java testcaseWilliam S Fulton2020-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | Fixes: ./director_string_runme.java:53: warning: [deprecation] Integer(int) in Integer has been deprecated
* | | | Merge pull request #1656 from mcfarljm/Issue-1647William S Fulton2020-01-141-0/+3
|\ \ \ \ | | | | | | | | | | Fix doxygen crash with empty comment (Issue #1647)
| * | | | Fix doxygen crash with empty commentJohn McFarland2019-10-301-0/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Update newly merged doxygen Java test for Java 9 APIWilliam S Fulton2020-01-141-9/+2
| | | | | | | | | | | | | | | | See 66a78261924174791a4952d05b58d52c16a36a57
* | | | Merge branch 'doxy/commands'William S Fulton2020-01-1411-10/+226
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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