Commit graph

4,837 commits

Author SHA1 Message Date
William S Fulton
602b0d5a2c Add doxygen testing of Java constructor wrappers 2018-06-18 18:56:21 +01:00
William S Fulton
9cc05724ef Add java runtime test for nested classes 2018-06-18 18:55:14 +01:00
William S Fulton
c5f9bb1e41 Add doxygen test for nested classes 2018-06-18 07:43:27 +01:00
William S Fulton
ecc66fdcbd Add Doxygen test for constant and fix JavaDoc indentation 2018-06-17 00:17:07 +01:00
William S Fulton
d22ecafb36 Fix Java doxygen:notranslate for single line comments
Remove extra generated line
2018-06-16 21:23:12 +01:00
William S Fulton
e96316bf31 Fix seg fault using Python 2 invalid utf-8 strings and wstring
Fixes seg fault when passing a Python string, containing invalid utf-8 content,
to a wstring or wchar * parameter.  A TypeError is thrown instead, eg:

  %include <std_wstring.i>
  void instring(const std::wstring& s);

  instring(b"h\xe9llooo") # Python
2018-06-15 19:39:12 +01:00
William S Fulton
4079fb927b Python 3.7 support - deprecation of classes in the collections module
Change the base classes in the pyabc.i file to use the
collections.abc module instead of collections due to the deprecation
of the classes in the collections module in Python 3.7.
2018-06-12 21:05:07 +01:00
William S Fulton
cf3ff89433 Fix doxygen testing for jdk < 9 2018-06-11 23:40:58 +01:00
William S Fulton
a539d9e1e5 Remove some debugging in java Makefile 2018-06-09 00:49:56 +01:00
William S Fulton
b0a42e38e7 Revert "JAVA_HOME nad tools.jar not needed for Java testing"
This reverts commit 7373b99079.

Seems to be needed for older jdks - needs some more work, as the
classpath used is not correct for jdk9.
2018-06-09 00:40:26 +01:00
William S Fulton
7373b99079 JAVA_HOME nad tools.jar not needed for Java testing
tools.jar doesn't seem to be needed (in jdk9 anyway), so removing it.
2018-06-08 19:12:39 +01:00
William S Fulton
4e27fdbfc1 Fix java test-suite parallel build (doxygen test cases)
CommentParser.class was being generated and read from multiple threads
Compile it just once using make dependencies.
2018-06-08 08:40:07 +01:00
Olly Betts
7c034ead32 Remove special handling for Python < 2.6
See #701.
2018-06-08 09:34:48 +12:00
William S Fulton
b189fb9456 Fix missing return value in doxygen test 2018-06-07 18:52:25 +01:00
William S Fulton
33921666a1 Merge branch 'vadz-doxygen'
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.
  ...
2018-06-07 08:13:10 +01:00
Olly Betts
d6d5db122b Remove support for PHP5
PHP5 is no longer actively supported by the PHP developers and security
support for it ends completely at the end of 2018, so it doesn't make
sense to include support for it in the upcoming SWIG 4.0.0 release.

See #701.
2018-06-07 18:09:03 +12:00
William S Fulton
396910c100 Doxygen warnings cleanup
- Remove unused warnings.
- Refactor some warnings.
- Document all Doxygen warnings.
2018-06-05 18:40:30 +01:00
William S Fulton
15f16155f2 Move doxygen warning numbers
Move out of the range reserved for language modules
2018-06-01 21:00:06 +01:00
William S Fulton
89a25055d9 Add Python doxygen example 2018-05-31 20:48:02 +01:00
William S Fulton
12e7926ee2 Doxygen example
Replace the unnecessarily large number of doxygen examples with one
doxygen example.
2018-05-31 20:13:52 +01:00
Olly Betts
7d11c2901e Drop no longer needed warning suppression for clang
74345c92e4 fixed the underlying problem
for Python, and it was fixed for other affected languages shortly
after - see https://github.com/swig/swig/pull/1027
2018-05-29 09:07:25 +12:00
William S Fulton
0ae73a67ff More merge fixes from doxygen branches 2018-05-25 23:36:24 +01:00
William S Fulton
8234656497 Correct python example headers 2018-05-25 23:35:28 +01:00
William S Fulton
448691cfa8 Another merge fix from doxygen branches 2018-05-25 23:19:16 +01:00
William S Fulton
7d1578e58c Add omitted doxygen_parsing_enums testcase
Still needs a Python runtime test
2018-05-25 07:56:45 +01:00
William S Fulton
95caf87596 PEP8 conformance for comment verifier module 2018-05-25 07:56:45 +01:00
William S Fulton
cbaf6eb2b3 Clean up merge problem 2018-05-25 07:56:45 +01:00
William S Fulton
caccb20491 Format files to unix format 2018-05-25 07:56:44 +01:00
William S Fulton
6bad5ca3a1 Doxygen testcase tweak to match that in the html docs 2018-05-25 07:56:44 +01:00
William S Fulton
abfc304740 Various merge fixes in doxygen branches 2018-05-19 08:12:10 +01:00
William S Fulton
0cfd53cff7 Merge branch 'master' into vadz-doxygen
* 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
2018-05-17 19:57:02 +01:00
luz.paz
60dfa31a67 Misc. typos
found via `codespell` and `grep`
2018-05-17 10:04:23 -04:00
William S Fulton
1f76cda125 Javascript test-suite Makefile parallel jobs
Suppress warning running test-suite and examples:
  make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
Note that node-gyp uses make under the hood and clearing the MAKEFILE env is the
only way I could find to suppress this warning.
2018-05-17 08:15:48 +01:00
Karl Wette
e66827be7d
Merge branch 'master' into octave 2018-05-17 14:08:29 +10:00
William S Fulton
aa6d7931ac Test for invalid C++17 nested namespace aliases 2018-05-14 21:03:31 +01:00
William S Fulton
220247c130 Test c++17 nested namespaces and %nspace 2018-05-14 21:03:31 +01:00
William S Fulton
5c39dcfb28 Add c++17 nested namespaces runtime test for C# 2018-05-14 21:03:31 +01:00
William S Fulton
c8f5f3a6d1 Add c++17 nested namespaces runtime test for Python 2018-05-14 21:03:31 +01:00
William S Fulton
348efc22ba Add support for c++17 nested namespaces
For example:
  namespace A::B { ... }
which is the equivalent to C++98 namespaces:
  namespace A { namespace B { ... } }
2018-05-14 21:02:10 +01:00
Karl Wette
a2ab3d7b20 Examples/test-suite/register_par.i: rename 'tree' to 'swig_tree'
- 'tree' is a declared symbol in Octave >= 4.4 headers
2018-05-12 22:25:07 +10:00
Karl Wette
64ad3f0ca8 Examples/octave/module_load/runme.m: update 'exist()' statements for Octave >= 4.4 2018-05-12 22:25:07 +10:00
Karl Wette
af97a312d4 Examples/octave/module_load/runme.m: do not use duplicate function names 2018-05-12 22:25:07 +10:00
Karl Wette
a169eef3c0 Examples/Makefile.in: unset OCTAVE_PATH when running Octave for tests 2018-05-12 22:25:07 +10:00
William S Fulton
ee17f8d04f C#, D, Java methodmodifiers on destructors
Add support so that the %csmethodmodifiers, %dmethodmodifiers,
%javamethodmodifiers can modify the method modifiers for the destructor wrappers
in the proxy class: dispose, Dispose, delete. With this feature, it is now possible
to make a C# proxy class sealed, eg when wrapping a class X, the virtual method modifiers
can be removed using:

  %typemap(csclassmodifiers) X "public sealed class"
  %csmethodmodifiers X::~X "public /*virtual*/";
2018-05-11 18:09:51 +01:00
William S Fulton
8555973a48 test-suite fixes (Java directors) for compilers that don't support varargs 2018-05-06 09:46:37 +01:00
William S Fulton
50cb18087d test-suite fixes (2) for compilers that don't support varargs
Split director_exception testcase into two so that testing throw(),
with no arguments, that is nothrows, can be tested separately to throw()
taking arguments. [The throw keyword needs to be removed for C++
compilation in C++11 and later when it was deprecated.]
2018-05-06 09:46:37 +01:00
William S Fulton
196a965067 test-suite fixes for compilers that don't support vararg macros
Split TESTCASE_THROW into multiple macros taking different number of arguments.
Fixes Visual Studio compiler errors.
2018-05-06 09:46:37 +01:00
William S Fulton
7ecf6a71b0 test-suite support for gcc-8 targeting C++11 and C++14
Some code in this test case is actually only supported in c++17...

cpp11_lambda_functions_wrap.cxx:275:87: error: the type ‘const<lambda(int, int)>’ of ‘constexpr’ variable ‘lambda18’ is not literal
 CONSTEXPR auto lambda18 = [] (int x, int y) mutable TESTCASE_THROW(int) { return x+y; };
                                                                                       ^
cpp11_lambda_functions_wrap.cxx:275:28: note: ‘<lambda(int, int)>’ is not literal because:
 CONSTEXPR auto lambda18 = [] (int x, int y) mutable TESTCASE_THROW(int) { return x+y; };
                            ^
cc1plus: note:   ‘<lambda(int, int)>’ is a closure type, which is only literal in C++17 and later
cpp11_lambda_functions_wrap.cxx:278:89: error: the type ‘const Space1::<lambda(int, int)>’ of ‘constexpr’ variable ‘Space1::lambda19’ is not literal
   CONSTEXPR auto lambda19 = [] (int x, int y) mutable TESTCASE_THROW(int) { return x+y; };
2018-05-04 20:02:13 +01:00
William S Fulton
6cc6d21bd2 test-suite fix for c++17 and throw macro 2018-05-04 20:02:13 +01:00
William S Fulton
e6b3a88f8a test-suite support for C++17: switch testing of the deprecated C++17 'register' keyword from C++ to C 2018-05-04 20:02:13 +01:00