Commit graph

3,615 commits

Author SHA1 Message Date
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
Karl Wette
6586616e23 Lib/octave: fix getting/setting global variables for Octave >= 4.4 2018-05-12 22:25:07 +10:00
Karl Wette
d0b1105f30 Lib/octave: use new class for function member dereference with Octave >= 4.4 2018-05-12 22:25:07 +10:00
Karl Wette
94e8853e61 Lib/octave: fix operator installation for Octave >= 4.4 2018-05-12 22:25:07 +10:00
Karl Wette
84aab22f66 Lib/Octave: in Octave >= 4.4, assign reference to base class in subclass
- See Examples/octave/callback/runme.m: a.run() calls Octave callback,
  but due to changes in behaviour to subsref() a.Callback.run() can no
  longer be used to call C callback unless a.Callback actually exists;
  subsrefs() just gets the "Callback" call whereas prior to Octave 4.4
  it would get both the "Callback" and "run" calls. So now a.Callback is
  set to the original base class (with own=0) so that it can be accessed
2018-05-12 22:25:07 +10:00
Karl Wette
ce67bce72e Lib/octave: fix call to mlock() for Octave >= 4.4 2018-05-12 22:25:07 +10:00
Karl Wette
df92ad6ebc Lib/octave: fix call to octave::call_stack::current() for Octave >= 4.4 2018-05-12 22:25:07 +10:00
Karl Wette
931656bcbe Lib/octave: 'octave_exit' not longer exists in Octave >= 4.4
- Instead must register atexit() function, since Octave still
  cannot clean up its memory usage on exit with SWIG modules
2018-05-12 22:25:07 +10:00
Karl Wette
04357dca21 Lib/octave: replace is_bool_type() with islogical() for Octave >= 4.4 2018-05-12 22:25:07 +10:00
Karl Wette
6f0561eb57 Lib/octave: replace is_numeric_type() with isnumeric() for Octave >= 4.4 2018-05-12 22:25:07 +10:00
Karl Wette
358345db9e Lib/octave: replace is_cell() with iscell() for Octave >= 4.4 2018-05-12 22:25:07 +10:00
Karl Wette
a46909a414 Lib/octave: call octave::feval() instead of feval() for Octave >= 4.4 2018-05-12 22:25:07 +10:00
Karl Wette
e8e507bf0b Lib/octave: fix function name passed to unwind_protect::begin_frame() 2018-05-12 22:25:07 +10:00
William S Fulton
1f7689fa8f Javascript assert.h - move to header section
Fixes compile problem due to throw macro skullduggery in the director_throws testcase
2018-05-06 23:10:33 +01:00
William S Fulton
6551d0fead Java vector wrappers cast correction
64 bit windows, fixes:
  warning C4267: 'initializing': conversion from 'size_t' to 'jint'
2018-05-06 09:46:37 +01:00
William S Fulton
bea708c796 Go - use director.swg like other languages
Changes the location of the director code wrt to the generated _wrap.h
file to fix throw macro skullduggery in the director_throws testcase
(see previous commit).
2018-05-06 09:46:37 +01:00
William S Fulton
3e4b7269c0 Enhance SWIG_isfinite for older standards: C++03/C++98/C89
Fixes testcase overload_numeric with -std=c++98 (clang and gcc 6 and later)

Issue #1239
2018-05-04 20:02:13 +01:00
William S Fulton
35c5a3a42a Scilab portability fixes - remove use of strdup 2018-05-04 20:02:13 +01:00
William S Fulton
179b41067d Scilab array overbounds fix handling char type exceptions 2018-05-04 20:02:13 +01:00
William S Fulton
4e0b2f1402 Cosmetic syntax tweak using throw in Octave directors 2018-05-04 20:02:13 +01:00
William S Fulton
ebd6558a30 __cplusplus macro usage tweak 2018-05-04 20:02:13 +01:00
Geert Janssens
a95ceabb70 guile - drop GDB_INTERFACE related stuff
Guile itself has removed it a long time ago:
http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commit;h=8510e39278161d3cbf8ec4ba87b123fe28763ed4
There's no need for it. I suspect it's just there because the
interface file was created based on the then real main source file of guile.
2018-04-20 08:36:49 +02:00
Geert Janssens
d1f7054b7e guile - replace obsolete scm_listify with scm_list_n
scm_list_n is available in all guile versions supported by swig, while
scm_listify no longer is in guile 2.2
2018-04-20 08:36:48 +02:00
Geert Janssens
46ab0c252d Fix off-by-one error
The condition only applies to guile 1.8 and older so it should really
have been '<2' all along. As we already have such a conditional block
earlier up, merge the two together as well.
2018-04-18 13:07:03 +12:00
Vadim Zeitlin
b7f78dd5a7 Merge branch 'master' into doxygen 2018-03-19 21:54:46 +01:00
William S Fulton
3ce3ce0683 Add std_shared_ptr.i for Scilab and R as boost_shared_ptr.i is already available 2018-03-09 06:58:08 +00:00
William S Fulton
7fbdd21b49 Javascript - Fix compilation error wrapping std::complex via std_complex.i
Closes #1187
2018-02-11 11:12:24 +00:00
Simon Marchetto
1647135369 [scilab] fix compilation (checked with the additional compiler options) 2018-02-01 14:31:52 +01:00
Simon Marchetto
7a9ee39412 [Scilab] fix compilation error 2018-02-01 10:09:35 +01:00
Simon Marchetto
862501480e add type name argument in SWIG_ptr() function to cast from pointer adress to typed pointers 2018-01-30 16:34:31 +01:00
William S Fulton
368cd3b52c Add ToArray test for C# std::vector wrapper 2018-01-12 18:26:47 +00:00
William S Fulton
6227013da4 Merge branch 'master' of https://github.com/Liryna/swig into Liryna-master
* 'master' of https://github.com/Liryna/swig:
  [C#] Add ToArray to std_vector.i
2018-01-12 18:02:33 +00:00
William S Fulton
c44adff7b9
Merge pull request #1177 from Sigill/sigabrt_rubyunlinkobject_fix
Do not abort when unlinking non-data ruby objects
2018-01-07 12:23:47 +00:00
William S Fulton
cd9b7c3c34 std_basic_string.i fixes
- Remove python code from octave's std_basic_string.i
- Correctly return an error to fix error handling when using std::basic_string in
  overloaded methods - issue #1171.
2018-01-04 07:00:26 +00:00
Cyrille Faucheux
a4884e45e1 Do not abort when unlinking non-data ruby objects
Fixes issue #1168.
Remove a call to abort() (introduced by commit
0e725b5d9b) made when SWIG_RubyUnlinkObjects()
is called on non T_DATA objects. It can happen when the destruction of T_DATA
objects is deferred: the Ruby GC first turn them to T_ZOMBIE, then calls their
free method (SWIG_RubyUnlinkObjects()).
2017-12-27 14:40:26 +01:00
William S Fulton
717b7866d4 Perl - Add support for missing directorfree typemaps
Related to issue #1167, to free up memory when returning reference types.
SWIG_Perl_AcquirePtr still needs implementing.
2017-12-14 07:51:45 +00:00
William S Fulton
e86c881a70 Fix directorout typemaps which were causing undefined behaviour when returning pointers by reference.
Closes #1167
2017-12-14 07:00:42 +00:00
William S Fulton
b0e29fbdf3 Add missing checks for failures in calls to PyUnicode_AsUTF8String.
Previously a seg fault could occur when passing invalid UTF8 strings (low
surrogates), eg passing u"\udcff" to the C layer (Python 3).
2017-12-04 20:14:04 +00:00
William S Fulton
069ce1f6e9 Merge branch 'java-director-exceptions'
* java-director-exceptions:
  Add recent Java director enhancements to the changes file
  Replace DirectorException::raiseJavaException with DirectorException::throwException
  Improve Java director exception customization documentation
  Add Swig::DirectorException directorthrows typemap for Java
  Cosmetic whitespace improvement in generated code from throws typemaps.
  Tidy up director_exception testcase
  Changes to use common DirectorException class
  Improved Java director exceptions documentation
  Java director exception handling improvements
2017-11-29 20:32:40 +00:00
William S Fulton
901f8357b0 Replace DirectorException::raiseJavaException with DirectorException::throwException
This is part of a plan to provide a common DirectorException api for
throwing the target language exception raised during a director method call.
2017-11-29 20:32:15 +00:00
William S Fulton
406c7a732a Add Swig::DirectorException directorthrows typemap for Java
For use with a global %catches(Swig::DirectorException)
2017-11-29 20:32:15 +00:00
William S Fulton
923091da13 Changes to use common DirectorException class
Add director.swg for Go as was completely absent.
This is just the start of a common exception handling approach to directors.
An exception thrown in a Java director method will be propogated back to
Java via a C++ DirectorException.
DirectorException throws typemap for Java is fully working, all other languages need work.
DirectorException throws typemap for Perl added just to fix compilation errors.
Add director_exception_catches test.
2017-11-29 20:31:55 +00:00
Joseph C Wang
4e8c515d36 add new tests and coercion files for null fix #1124 2017-11-26 03:43:39 +08:00
Joseph C Wang
9c32a1e722 fix null changes to work with C90 compilers 2017-11-26 03:42:32 +08:00
Joseph C Wang
0b97170f1d fix #1124 - return R_NilValue for null pointer objects
This fixes #1124 and returns R_NilValue for null pointer objects
2017-11-24 23:43:02 +08:00
William S Fulton
077bb0b04f Improved Java director exceptions documentation 2017-11-16 20:03:58 +00:00
William S Fulton
7aa28e37ec Java director exception handling improvements
When a director method throws an exception and it is caught by DirectorException
and passed back to Java using DirectorException::raiseJavaException, the Java
stack trace now contains the original source line that threw the exception.

Director exception handling code improved slightly to add some missing
ExceptionClear calls before calling JNI code.
2017-11-10 19:50:22 +00:00
William S Fulton
dafe2d6949 Add director typemaps for pointer const ref types 2017-10-24 23:47:40 +01:00
Quentin
4326da9ab3 [C#] Add ToArray to std_vector.i 2017-10-19 09:45:57 +02:00