Commit graph

1,409 commits

Author SHA1 Message Date
William S Fulton
687cf9c9c1 Add missing %python:maybecall to operator overloads.
This ensures NotImplemented is returned on error so that the Python
interpreter will handle the operators correctly instead of throwing an
exception. NotImplemented was not being returned for non-builtin wrappers
when the operator overload did not have a function overload.

See PEP 207 and https://docs.python.org/3/library/constants.html#NotImplemented

Mentioned in SF patch #303 and SF bug #1208.
2017-06-19 19:25:27 +01:00
William S Fulton
10e73a5bfb Java jboxtype typemap documentation and tidy up 2017-06-05 20:47:49 +01:00
William S Fulton
57a89f987d Fix %import and %fragment forced inclusion to not generate code. 2017-06-03 18:37:05 +01:00
William S Fulton
857a62425c Formatting fixes in Lisp docs 2017-06-03 18:37:05 +01:00
William S Fulton
10172161bf Update STL library documentation 2017-05-20 15:38:38 +01:00
Olly Betts
9a0180c56c Merge pull request #970 from nihal95/master
Adds pragma version directive for php5 and php7.  Fixes #360.
2017-05-16 17:47:35 +12:00
William S Fulton
07ab80b49e Add raise methods for throwing c++ exceptions in C#, Java, D
The director c++ exceptions are thrown in a helper method instead of in
the director overloaded method. This circumvents compiler warnings about
throwing exceptions when the method has an exception specification or
noexcept. If the exception is thrown, abort will still be called!
In Java, the "director:noexcept" typemap can be used to do something
else. This typemap should be ported to the other languages too.
2017-05-13 17:01:15 +01:00
Nihal
21108781a7 Add documentation and examples for php version pragma.
Pragma version to specify versions for PHP5 and PHP7 extensions.
See issue #360.
2017-05-08 12:02:53 +05:30
William S Fulton
28f7d61986 Bump version to 4.0.0 2017-04-21 19:36:09 +01:00
Simon Marchetto
c06c9b3853 [Scilab] New parameter targetversion to specify the Scilab target version (5, 6, ..) for code generation
With Scilab 6 target specified, identifier names truncation is disabled (no longer necessary)

Signed-off-by: Simon Marchetto <simon.marchetto@scilab-enterprises.com>
2017-04-12 13:54:42 +02:00
Julien Schueller
7350e9fffa Typo in Python.html 2017-03-24 14:22:53 +01:00
William S Fulton
f0f2fd2dae Merge branch 'tleonhardt-python_threads'
* tleonhardt-python_threads:
  Style fixes for Python threads documentation changes
  Finished updating Python docs for -threads option
  Started making changes to Python.html to document support for multithreaded Python SWIG applications.
2017-03-24 08:22:51 +00:00
William S Fulton
d888fabc0c Style fixes for Python threads documentation changes 2017-03-24 08:22:16 +00:00
スノル
970b0fdca3 Add the missing parenthese.
I'm sorry that I didn't notice this last time.
2017-03-20 20:47:08 -05:00
William S Fulton
da381668a2 Python doc correction for %pybuffer_mutable_string usage
[skip ci]
2017-03-17 19:02:38 +00:00
Todd Leonhardt
bcf8d927f0 Finished updating Python docs for -threads option 2017-03-01 17:51:47 -05:00
Olly Betts
b451fc464b Escape literal > in HTML 2017-03-02 08:45:45 +13:00
Todd Leonhardt
52d12bc415 Started making changes to Python.html to document support for multithreaded Python SWIG applications. 2017-02-28 20:53:30 -05:00
William S Fulton
d6a349997c C++11 hash tables documentation 2017-02-10 19:49:58 +00:00
William S Fulton
2ab08e493f Bump version to 3.0.13
[skip ci]
2017-01-28 00:23:59 +00:00
William S Fulton
ac916b006a Add 3.0.12 release notes and date
[skip ci]
2017-01-26 19:24:40 +00:00
William S Fulton
b538070016 Enhance %extend to extend a class with template methods 2017-01-22 10:36:46 +00:00
Karl Wette
e24ec40895 Octave: add support for version 4.2
- .travis.yml:
  - ppa:kwwette/octaves has Octave version 4.2, also run C++11 tests
- configure.ac:
  - prefer Octave program "octave-cli" to "octave"
  - extract any -std=* flags from CXX, add to OCTAVE_CXXFLAGS
- Lib/typemaps/fragments.swg:
  - SWIG_isfinite_func(): extern "C++" is required as this fragment can
    end up inside an extern "C" { } block
- Lib/octave:
  - add std_wstring.i (copied from std_string.i) for C++11 tests
- Lib/octave/octrun.swg:
  - move Octave version-checking macros to octruntime.swg
  - Octave single()/double() functions now call .as_single()/.as_double()
    methods; redirect calls to __float__() method as per .scalar_value()
  - << and >> operators are no longer supported by Octave
- Lib/octave/octruntime.swg:
  - move Octave version-checking macros here for conditional #includes
  - #include interpreter.h instead of #toplev.h
  - #include call-stack.h (now needed for octave_call_stack)
  - unwind_protect is now in octave:: namespace
  - error_state and warning_state are deprecated; use try/catch to catch
    errors in feval() instead
  - always set octave_exit = ::_Exit, to try to prevent segfault on exit
- Lib/octave/octopers.swg:
  - << and >> operators are no longer supported by Octave
- Lib/octave/exception.i:
  - Add macro SWIG_RETHROW_OCTAVE_EXCEPTIONS which rethrows any
    exceptions raised by Octave >= 4.2
- Examples/test-suite/exception_order.i:
  - Use macro SWIG_RETHROW_OCTAVE_EXCEPTIONS to rethrow exceptions
    raised by error() function in Octave >= 4.2
- Update Doc/Manual/Octave.html and CHANGES.current
2017-01-22 11:53:12 +13:00
Karl Wette
52455b81d2 Octave: move Travis build over to trusty
- trusty has Octave version 3.8
- ppa:kwwette/octaves has Octave version 4.0
- Update Doc/Manual/Octave.html
2017-01-22 11:53:12 +13:00
William S Fulton
c238036448 Ruby doc tweak
[skip ci]
2017-01-20 19:53:47 +00:00
William S Fulton
9503f2ebe8 Fix typo in ruby docs 2017-01-20 19:16:51 +00:00
Vadim Zeitlin
93c1d531f5 Improve advice for finding the Ruby headers include directories
Don't advise using "$:", which is for Ruby models, and doesn't include/map to
the directories containing the headers. Advise using rbconfig module instead.

The new instructions are known to work out of the box both under Linux and
macOS.

[skip ci]
2017-01-20 18:21:31 +01:00
William S Fulton
6ec243c093 Fix Java directorin typemap example 2017-01-17 19:27:16 +00:00
William S Fulton
19f21d1dd5 Reference %proxycode from javacode typemap section in docs 2017-01-13 20:52:33 +00:00
William S Fulton
3d2e57b0f2 Add %proxycode directive for adding code into proxy classes for C#, D and Java 2017-01-13 20:43:50 +00:00
William S Fulton
88e2d02ead Document %insert filename and add test for it 2017-01-13 20:43:50 +00:00
William S Fulton
92d694225a Update wiki links to new Github wiki site
[skip ci]
2017-01-05 18:39:57 +00:00
William S Fulton
caed1110fb Remove redundant cpp11.html file
This was superceded by Doc/Manual/CPlusPlus11.html
2017-01-05 07:37:40 +00:00
William S Fulton
5b49ad3485 Correct some whitespace changes 2017-01-01 14:28:49 +00:00
sunoru
9a6f82ab31 Realign for some comments. 2016-12-31 23:29:45 +08:00
sunoru
8985c34809 Fix some typos in docs and examples and make the code look nicer. 2016-12-31 23:06:56 +08:00
William S Fulton
12e1ab0e93 Bump version to 3.0.12 2016-12-30 23:49:46 +00:00
William S Fulton
7c8cb62271 Add 3.0.11 release date 2016-12-29 18:02:27 +00:00
William S Fulton
01fa85bda7 Add %feature("csdirectordelegatemodifiers") for C#
Enable customization of the delegate access modifiers generated in director classes.
Fixes https://github.com/swig/swig/issues/748
2016-12-24 17:14:36 +00:00
William S Fulton
10366d16e3 Fix documented C# director class example to reflect the generated code
https://github.com/swig/swig/issues/748
2016-12-24 16:10:47 +00:00
Olly Betts
ff7825c7a6 Fix doc typo 2016-12-19 13:32:59 +13:00
William S Fulton
eb6121fa30 Minor Java html doc correction 2016-12-18 17:49:47 +00:00
Brian Caine
391bb79cba Added support for guile's native pointer type 2016-12-16 15:15:13 +13:00
Olly Betts
07b7edcd87 [php] Improve %feature("director:except") docs
See https://github.com/swig/swig/pull/628
2016-12-15 17:16:20 +13:00
William S Fulton
2a42031b08 Custom Python module importing code
Add optional moduleimport attribute to %module so that the
default module import code can be overridden. See the
"Searching for the wrapper module" documentation in Python.html.
Example:

  %module(moduleimport="import _foo") foo

$module also expands to the low-level C/C++ module name, so
the following is the same as above

  %module(moduleimport="import $module") foo

Issue https://github.com/swig/swig/issues/769
2016-12-01 18:59:33 +00:00
Olly Betts
d6c5f64ec3 Eliminate some differences between -help and the manual 2016-11-30 13:29:40 +13:00
Olly Betts
75a00cd15e [PHP7] Make default C++ extension .cxx
This is SWIG's default for every language except PHP, and now is a
good time to make this change so that once we drop PHP5 support, we'll
have the same default everywhere.  It's easy to override the default
with -cppext cxx to get the PHP5 behaviour.
2016-11-30 13:27:13 +13:00
Olly Betts
f4d8a7f78b PHP now generates E_NOTICE for misspelled constant 2016-11-30 13:07:17 +13:00
Olly Betts
1169874f59 [PHP] Add support for PHP7.
PHP5's C extension API has changed substantially so you need to use
-php7 to specify you want PHP7 compatible wrappers.
Fixes https://github.com/swig/swig/issues/571
2016-11-30 13:05:59 +13:00
William S Fulton
c27b8622bd Update C# compilers 2016-11-25 18:55:52 +00:00