summaryrefslogtreecommitdiff
path: root/Source/Modules/java.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Minor refactor of D, C#, Java director codeWilliam S Fulton2022-11-121-10/+16
| | | | | for overloaded methods. Fixes regression (crash) in director_ignore D testcase since string mangling names change.
* SwigType * handling correctionsWilliam S Fulton2022-11-091-12/+9
| | | | | | | | | Further corrections to pass SwigType * to methods expecting types instead of passing readable type strings. Required reworking code that adds a fake inheritance for smart pointers using the smartptr feature. Swig_smartptr_upcast() added as a support function for this.
* Cleanup SWIG_VERSION definitionWilliam S Fulton2022-10-131-1/+1
| | | | | | | | | | | | | Add Swig_obligatory_macros which must be called by each target language to define SWIG_VERSION correctly in the generated code, as well as the language specific macro SWIGXXX where XXX is the target language name. Drop the #ifdef SWIGXXX that was previously generated - I can't see the point of this and if users are defining this macro somehow, then users will need to change this Closes #1050
* Use https for swig.org linksOlly Betts2022-10-061-1/+1
|
* Order of interfaces generated for %interface macrosWilliam S Fulton2022-07-201-6/+4
| | | | | Ensure the order of interfaces generated in proxy interfaces for the %interface family of macros is the same as that parsed from the bases in C++.
* Merge branch 'imfunc'William S Fulton2022-05-301-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | * imfunc: Add special variable imfuncname expansion for C# and D Test and document imfuncname special variable expansion Update docs. Also expose in proxyClassFunctionHandler Expose to javaout typemaps. Conflicts: CHANGES.current
| * Merge branch 'swig:master' into imfuncLindleyF2022-02-021-1/+1
| |\
| * | Also expose in proxyClassFunctionHandlerLindley French2021-06-241-0/+1
| | |
| * | Expose to javaout typemaps.Lindley French2021-06-231-0/+1
| | |
* | | Header file tidyupWilliam S Fulton2022-05-071-1/+1
| | | | | | | | | | | | | | | Fix Visual C++ warning in scilab.cxx: warning C4996: 'strtok': This function or variable may be unsafe.
* | | %interface family of macros no longer add variable wrappersWilliam S Fulton2022-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The getter/setter methods used for wrapping methods are no longer added to the interface class. Closes #1524 Also add in testcase for enums.
* | | %interface family of macros enum fix for JavaWilliam S Fulton2022-03-121-4/+1
| | | | | | | | | | | | | | | enums were being generated into the interface class instead of the proxy class.
* | | Use GetFlag instead of Getattr for feature:interfaceWilliam S Fulton2022-03-121-5/+5
| | |
* | | Add DOH Exit() and SetExitHandler()Olly Betts2022-03-061-14/+14
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exit() is a wrapper for exit() by default, but SetExitHandler() allows specifying a function to call instead. This means that failures within DOH (e.g. Malloc() failing due to lack of memory) will now perform cleanup such as removing output files. This commit also cleans up exit statuses so SWIG should now reliably exit with status 0 if the run was successful and status 1 if there was an error (or a warning and -Werror was in effect). Previously in some situations SWIG would try to exit with the status set to the number of errors encountered, but that's problematic - for example if there were 256 errors this would result in exit status 0 on most platforms. Also some error statuses have special meanings e.g. those defined by <sysexits.h>. Also SWIG/Javascript tried to exit with status -1 in a few places (which typically results in exit status 255).
* | Fix nspace warning messageWilliam S Fulton2021-11-111-1/+1
|/
* Remove support for $source and $targetOlly Betts2021-04-301-10/+0
| | | | | | | | These were officially deprecated in 2001, and attempts to use them have resulted in a warning (including a pointer to what to update them to) for most if not all of that time. Fixes #1984
* Add access modifier support for interface featureWilliam S Fulton2020-09-251-1/+2
| | | | | | | | | | | | | | Add ability to change the modifiers for the C# and Java interface generated when using the %interface macros. For C# use the 'csinterfacemodifiers' typemap. For Java use the 'javainterfacemodifiers' typemap. For example: %typemap(csinterfacemodifiers) X "internal interface" Closes #1874
* Fix crashes in swig_connect_director during director class construction.William S Fulton2020-08-281-21/+10
| | | | | | | | | | | Occurs when using the director class from multiple threads - a race condition initialising block scope static variables. Block scope static variables are guaranteed to be thread safe in C++11, so the fix is guaranteed when using C++11. However, most modern compilers also fix it when using C++03/C++98. Closes #1862
* Add some comments about shared_ptr upcast codeWilliam S Fulton2020-01-241-0/+1
|
* Refactor upcasts codeWilliam S Fulton2020-01-231-25/+28
| | | | | | In preparation for possible improvement in usage of SwigType_typedef_resolve_all - a SwigType* should be used, not a readable name in a String*.
* Merge branch 'shared-ptr-template-upcast'William S Fulton2020-01-171-5/+8
|\ | | | | | | | | | | | | | | | | | | | | | | * 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
| * Applying shared_ptr template upcast fix to CSharp, adding CSharp test, and ↵etse2019-05-061-12/+0
| | | | | | | | cleanup
| * WIP - Use the non-encoded type string for upcasting a shared_ptr of a ↵Eric Tse2019-05-061-5/+20
| | | | | | | | derived type to a shared_ptr of the base type
* | Fix invalid code generated for "%constant enum EnumType ..." and add a test.Rokas Kupstys2019-08-011-1/+1
| |
* | Fix class name for nested classesIsaac Pascual Monells2019-06-271-1/+1
|/ | | | The feature %interface_impl from swiginterface.i differ on generated function name from JNI wrapper class when using nested classes without flatnested.
* Fix minor whitespace regression in Java generated codeWilliam S Fulton2019-04-181-1/+1
|
* Add the parameters typemap attribute to D and Java destructor wrapper typemapsWilliam S Fulton2019-04-081-3/+8
| | | | | | | Added to the javadestruct, javadestruct_derived, ddispose, ddispose_derived typemaps to mirror enhanced flexibility in the csdisposing and csdisposing_derived (C#) typemaps. If provided the contents are generated as the delete/dispose method's parameters declaration.
* Doxygen JavaDoc class comments fixWilliam S Fulton2018-06-171-10/+11
| | | | Generate "javaimports" typemap contents before Doxygen JavaDoc comments.
* Show enum name in presence of Doxygen comment for simple Java enumsWilliam S Fulton2018-06-171-3/+3
|
* Doxygen comment JavaDoc indentation fix for simple Java enumsWilliam S Fulton2018-06-171-2/+2
|
* Remove duplicate doxygen comment when using simple Java enumsWilliam S Fulton2018-06-171-8/+8
|
* Add Doxygen test for constant and fix JavaDoc indentationWilliam S Fulton2018-06-171-1/+1
|
* Correct JavaDoc from doxygen comments indentationWilliam S Fulton2018-06-171-22/+21
| | | | | | | | Adds missing JavaDoc indentation for doxygen comments obtained from: - enum values - class methods - constructors - global functions/variables
* Merge branch 'vadz-doxygen'William S Fulton2018-06-071-7/+116
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the Doxygen work begun in Google Summer of Code projects 2008 and 2012 and subsequently improved by numerous contributors. * vadz-doxygen: (314 commits) Add changes entry for Doxygen support Add some missing doctype tyemaps Doxygen warnings cleanup Move doxygen warning numbers Add Python doxygen example Doxygen example Add Doxygen to include paths Doxygen source rename More merge fixes from doxygen branches Correct python example headers Correct source code headers Another merge fix from doxygen branches Java enums output format fixes Add omitted doxygen_parsing_enums testcase PEP8 conformance for comment verifier module Clean up merge problem Doxygen html tweaks Update html chapter numbering for added Doxygen chapter Fixes to makechap.py to detect ill-formed headers html fixes for Doxygen Add missing CPlusPlus17.html file Format files to unix format Doxygen testcase tweak to match that in the html docs Doxygen html documentation updates and corrections Remove doxygen Examples subdirectory Beautify doxygen source code Code formatting fixes in doxygen code Remove unused doxygen code new_node refactor Various merge fixes in doxygen branches Unused variable warning fix Fix wrongly resetting indent after formulae in Doxygen comments Add support for doxygen:alias feature Get rid of meaningless return type of DoxygenParser methods Return enum, not untyped int, when classifying Doxygen commands Get rid of unnecessary "typedef enum" in C++ code Use slash, not backslash, in "C/C++" in the documentation Replace literal "<" with "&lt;" in HTML documentation Fix broken link to java.sun.com in Doxygen documentation Fix using com.sun.tools.javadoc package under macOS Fix error reporting for special characters in Doxygen parsing code Switch Python Doxygen unit tests to use inspect.getdoc() Use correct separator in Java class path under Windows. Remove executable permission from appveyor.yml. Use JAVA_HOME value in configure to detect Java. Display JAVA_HOME value in "make java_version". Fix harmless MSVC warning in DoxygenTranslator code. Reset "_last" for all but first enum elements. Don't duplicate Javadoc from global enum Doxygen comments twice. Move Doxygen comments concatenation from the parser to the lexer. Fix shift/reduce conflicts in Doxygen pre/post comment parsing. Rewrote part of the grammar dealing with Doxygen comments for enums. No changes, just remove spurious white space only differences. Move Doxygen comment mangling from the parser to the lexer. Merge "-builtin" autodoc bugs workarounds from master into test. Quote JAVA_HOME variable value in Java test suite makefile. Remove unused C_COMMENT_STRING terminal from the grammar. Fix missing returns in the Doxygen test suite code. Fix trimming whitespace from Doxygen comments. Remove code not doing anything from PyDocConverter. Remove unused <sstream> header. Remove unreferenced struct declaration. Remove unused Swig_warn() function. Remove any whitespace before ignored Doxygen commands. Remove trailing space from one of Doxygen tests. Fix autodoc strings generated in Python builtin case and the test. Fix Doxygen unit test in Python "-builtin" case. Use class docstrings in "-builtin" Python case. Don't indent Doxygen doc strings in generated Python code. Add a possibility to flexibly ignore custom Doxygen tags. Stop completely ignoring many Doxygen comments. Fix structural Doxygen comment recognition in the parser. No changes, just make checking for Doxygen structural tags more sane. Use "//", not "#", for comments in SWIG input. Allow upper case letters and digits in Doxygen words. Pass the node the Doxygen comment is attached to to DoxygenParser. Get rid of findCommand() which duplicaed commandBelongs(). Recognize unknown Doxygen tags correctly. No real changes, just pass original command to commandBelongs(). Describe Doxygen-specific %features in a single place. Give warnings for unknown Doxygen commands in Doxygen parser. Document the return type when translating Doxygen @return to Python. Fix translated Doxygen comments for overloaded functions in Python. Also merge Doxygen comments for overloaded constructors in Python. Allow using enum elements as default values for Python functions. Don't always use "*args" for all Python wrapper functions. No real changes, just make PYTHON::check_kwargs() const. Refactor: move makeParameterName() to common Language base class. Remove long line wrapping from Python parameter list generation code. Simplify and make more efficient building Python docstrings. Translate Doxygen code blocks to Sphinx code blocks. Add a simple test of multiple parameters to Doxygen test suite. Make Python parameters types hyperlinks in the doc strings. Make Language::classLookup() and enumLookup() static. Fix arguments of @param, @return etc translations to Python. Remove unused method from PyDocConverter. No real changes, just remove an unnecessary variable. Preserve relative indentation when parsing Doxygen comments. Use Sphinx-friendly formatting for overloaded functions documentation. Add poor man trailing white space detection to Doxygen Python tests. ...
| * Add Doxygen to include pathsWilliam S Fulton2018-05-291-1/+1
| |
| * Doxygen source renameWilliam S Fulton2018-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | Source/DoxygenTranslator/src directory is renamed Source/Doxygen Renamed files in this directory to short names using lowercase as is the convention for the rest of the SWIG source. C++ extension is also .cxx like other SWIG source code. I used doxy as the prefix for most file renames because without this Doxygen/parser.* would be easily confused with CParse/parser.* so Doxygen/doxyparser.* is renamed from DoxygenTranslator/src/DoxygenParser.*
| * Java enums output format fixesWilliam S Fulton2018-05-251-5/+6
| | | | | | | | | | Restore generated Java enum code output to what it was pre-doxygen code changes. Improves code with doxygen comments too.
| * Code formatting fixes in doxygen codeWilliam S Fulton2018-05-251-51/+44
| |
| * Remove unused doxygen codeWilliam S Fulton2018-05-191-25/+1
| |
| * Merge branch 'master' into vadz-doxygenWilliam S Fulton2018-05-171-5/+16
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Add Octave 4.4 to Travis allow_failures Fixes for appveyor image changes Javascript test-suite Makefile parallel jobs Add changes entry for csconstruct, dconstruct and javaconstruct fix Fix lookup of csconstruct, dconstructor and javaconstruct typemaps Javascript %nspace fix in generated C++ code Add C++17 documentation chapter Add changes notes for C++17 nested namespaces support Test for invalid C++17 nested namespace aliases Test c++17 nested namespaces and %nspace Add c++17 nested namespaces runtime test for C# Add c++17 nested namespaces runtime test for Python Add support for c++17 nested namespaces Update CHANGES.current .travis.yml: test against Octave 4.4 Examples/test-suite/register_par.i: rename 'tree' to 'swig_tree' Examples/octave/module_load/runme.m: update 'exist()' statements for Octave >= 4.4 Examples/octave/module_load/runme.m: do not use duplicate function names Examples/Makefile.in: unset OCTAVE_PATH when running Octave for tests Lib/octave: fix getting/setting global variables for Octave >= 4.4 Lib/octave: use new class for function member dereference with Octave >= 4.4 Lib/octave: fix operator installation for Octave >= 4.4 Lib/Octave: in Octave >= 4.4, assign reference to base class in subclass Lib/octave: fix call to mlock() for Octave >= 4.4 Lib/octave: fix call to octave::call_stack::current() for Octave >= 4.4 Lib/octave: 'octave_exit' not longer exists in Octave >= 4.4 Lib/octave: replace is_bool_type() with islogical() for Octave >= 4.4 Lib/octave: replace is_numeric_type() with isnumeric() for Octave >= 4.4 Lib/octave: replace is_cell() with iscell() for Octave >= 4.4 Lib/octave: call octave::feval() instead of feval() for Octave >= 4.4 Lib/octave: fix function name passed to unwind_protect::begin_frame() C#, D, Java methodmodifiers on destructors Javascript assert.h - move to header section Appveyor cl compiler warning fixes during configure Java vector wrappers cast correction test-suite fixes (Java directors) for compilers that don't support varargs Go - use director.swg like other languages test-suite fixes (2) for compilers that don't support varargs Consistent spacing in generated exception specifications test-suite fixes for compilers that don't support vararg macros Enhance Travis testing to use gcc 8 and test C++17 and C17 Enhance SWIG_isfinite for older standards: C++03/C++98/C89 test-suite support for gcc-8 targeting C++11 and C++14 Scilab portability fixes - remove use of strdup Scilab array overbounds fix handling char type exceptions test-suite fix for c++17 and throw macro Remove use of 'register' in C source test-suite support for C++17: switch testing of the deprecated C++17 'register' keyword from C++ to C Examples update to support C++17: exception specification throw removal Cosmetic syntax tweak using throw in Octave directors test-suite support for C++17 (Java): exception specification throw removal test-suite support for C++17: exception specification throw removal __cplusplus macro usage tweak Improve detection of Python's 2to3 tool Correct C shared library creation when specifing CC to configure Remove superfluous parens in generated Python scripts. [ci] guile 2.2 build no longer expected to fail guile - resstructure some configure tests Disable guile configuration if guile-config and guile report a different version Fix guile executable detection on early 2.0.x guile versions guile - drop GDB_INTERFACE related stuff guile - replace obsolete scm_listify with scm_list_n guile - use more reliable method of finding guile executable based on guile-config Fix go version matching in configure for go1.10 [Python] Suppress new pycodestyle warning Add if-no-present action for jsv8inc arg Fix typo in help --with-jscoreinc and --with-jscorelib Fix off-by-one error * Makefile.in (configfiles): Update URLs for latest configfiles. Add changes entry for Ruby %alias fix for global functions [Ruby] Pass Qnil instead of NULL to rb_funcall() Fix typo Fix ruby %alias directive for native c functions Stop testing Python on Appveyor msys/mingw Fix -Wimplicit-fallthrough gcc-7.3 warning
| * \ Merge branch 'master' into doxygenVadim Zeitlin2018-03-191-23/+29
| |\ \
| * \ \ Merge branch 'master' into doxygenVadim Zeitlin2017-09-191-45/+25
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Fix the usual conflicts in autodoc unit test due to fixing the divergences in autodoc generation between builtin and default cases in this branch.
| * \ \ \ Merge branch 'master' into doxygenVadim Zeitlin2017-02-011-2/+14
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Merge 3.0.12 release changes from master.
| * \ \ \ \ Merge branch 'master' into doxygenVadim Zeitlin2016-12-121-99/+358
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way Python docstrings are indented has changed on master, so use the standard inspect module in Python autodoc unit test to ignore the differences in their indentation level between -builtin and non-builtin cases to make the test still pass with the branch version, which avoids the use of different (but almost identical) values in the test itself.
| * | | | | | Don't duplicate Javadoc from global enum Doxygen comments twice.Vadim Zeitlin2015-07-271-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit d52de0f36f570ff9aa0011a10ab6a9023cd8b56c did fix the bug with missing Javadoc comments for the nested enums, but it also resulted in the Javadoc being generated twice for global enums, remove the code outputting the same Javadoc for the second time to fix this.
| * | | | | | Another merge with master.Vadim Zeitlin2015-07-201-6/+7
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updated Doxygen error numbers yet again, as Python errors got added in the meanwhile, pushing the Doxygen ones further off. And re-merged PEP8/whitespace-related conflicts in autodoc_runme.py once again (if anybody is looking for a motivating example about why significant whitespace is bad, here is a great use case).
| * \ \ \ \ \ \ Another merge with master.Vadim Zeitlin2015-02-161-12/+1
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change Doxygen error codes to start at 740 instead of at 720 as the latter was taken by Scilab in the meanwhile. Resolve conflicts in autodoc_runme.py once again.
| * \ \ \ \ \ \ \ Merge latest master into doxygen branch.Vadim Zeitlin2014-12-151-30/+40
| |\ \ \ \ \ \ \ \
| * | | | | | | | | Refactor: move makeParameterName() to common Language base class.Vadim Zeitlin2014-08-221-38/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method was duplicated more or less identically for 4 languages and will be needed for another one soon, so put it in the base class from which it can be simply reused instead. No changes in the program behaviour whatsoever.
| * | | | | | | | | Replace DoxygenTranslator debug parameters with a single flags one.Vadim Zeitlin2014-08-131-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the code more readable and more extensible as more flags are easier to add in the future than more boolean parameters. No user-visible changes.