Commit graph

45 commits

Author SHA1 Message Date
Zackery Spytz
e5b8b5a164 [OCaml] Some exception improvements
The OCaml module's exception handling code was poorly designed,
gave confusing exception messages, and was vulnerable to buffer
overflows.

The OCaml module's SWIG_exception_() was adding a useless newline to
the end of the exception message.

In some cases, the integer value of f.e. SWIG_TypeError was being added
to the exception message.

The unneeded else in the OCaml module's SWIG_contract_assert() macro
was causing -Wmisleading-indentation warnings.

The OCaml module's exception handling code now mirrors that of the
Java module.

Add Lib/ocaml/std_except.i.
Add multiple runtime tests.
2019-02-07 16:25:10 -07:00
William S Fulton
09e0577d95 Disable Chicken target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:42:12 +00:00
Zackery Spytz
05589508a6 [OCaml] Add the caml_ prefix to some OCaml functions
In OCaml 3.08.0, many functions in the OCaml C API were renamed to
include a caml_ prefix. Their previous names were retained as macros
in caml/compatibility.h and were (apparently) deprecated.

Rename occurrences of alloc_string, alloc_tuple, callback, callback2,
callback3, copy_double, copy_int64, copy_string, failwith, and modify
in the OCaml module.

The OCaml module requires OCaml >= 3.08.3, so this change is safe
for all supported OCaml versions.
2019-01-14 20:45:13 -07: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
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
Daniel Vollmer
ce1cb85d86 Add <typeinfo> header for std::bad_cast 2016-09-17 13:24:32 +02:00
Olly Betts
26bbc96d58 Arrange to return after calling zend_throw_exception()
Fixes github issue#240.
2016-09-16 17:54:02 +12:00
Olly Betts
b0e809d94b Remove unnecessary block from PHP version of SWIG_exception macro 2014-04-03 11:23:57 +13:00
Geert Janssens
d689d9a860 Fix deprecation warnings for test suite under guile 2.0 2013-04-28 22:06:24 +02:00
Geert Janssens
b819d2a91e Drop guilegh interface
All of guile's interface files now use the scm interface.
This should not affect any users. Swig generated code
using the scm interface can be mixed with gh interface
using user code.
It does simplify maintenance of the guile swig code though.
2013-04-28 22:06:24 +02:00
Olly Betts
23bcc1c66b Remove lingering relic of PHP4 support 2013-03-20 16:45:24 +13:00
David Nadlinger
03aefbc6e9 Added support for the D programming languge.
It is still a bit rough around some edges, particularly with regard to multi-threading and operator overloading, and there are some documentation bits missing, but it should be fine for basic use.

The test-suite should build and run fine with the current versions of DMD, LDC and Tango (at least) on Linux x86_64 and Mac OS X 10.6.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12299 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-18 00:24:02 +00:00
William S Fulton
4308dd03cf SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-27 23:26:02 +00:00
William S Fulton
4516c1d3f3 Fix exception handling when %catches is used in C#
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11583 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-15 23:22:20 +00:00
Olly Betts
e6611209f6 [PHP5] Fix how zend_throw_exception() is called (bug #1700785).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9673 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-04-16 15:13:45 +00:00
Olly Betts
baabc2b834 Use SWIGPHP rather than SWIGPHP4 since the latter is now only defined when
generating code explicitly for PHP4.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9379 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-29 10:03:50 +00:00
William S Fulton
49be05f4fd Common template for head of each file detailing licence, distribution and authors information
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8973 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-07 00:14:10 +00:00
William S Fulton
c8152a2016 Php5 exception support from Ollie Betts
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8930 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-02 22:11:16 +00:00
Marcelo Matus
c2485c17a0 reduce polution of macro comments by using one line macros
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8922 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-01 23:27:03 +00:00
Marcelo Matus
1122c39ec4 add the SWIGUTL macro to identify a language using the Unified Typemap Library, and using it around
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8594 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-28 17:35:22 +00:00
Marcelo Matus
0c499a93cf add guards for wrong inclusions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8449 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-15 02:10:15 +00:00
Marcelo Matus
6e72e8e7b5 add the throws (...) typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8385 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-12 06:10:27 +00:00
Marcelo Matus
3c65cea431 Perl added to the Unified typemap library, cleaner way to use the library, and 'normalized' macro names
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7707 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-24 14:59:05 +00:00
Marcelo Matus
ba3efb0917 finishing the first stage of the typemap unification scheme, fixing issues with gcc and valgrind
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7692 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-20 09:47:56 +00:00
Marcelo Matus
7e5e4fd1f9 massive typemap unification
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7676 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-18 13:24:15 +00:00
Marcelo Matus
86984eb3d9 fix error in const char* to char* invalid cast
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7546 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-29 09:43:36 +00:00
William S Fulton
afda89dc49 Mark Gossage patch 1295168
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7470 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-20 19:35:23 +00:00
William S Fulton
1abc5c131b C# and Java SWIG_exception changes. Previous mods didn't work with compilers that can't handle empty macro parameters. Now SWIG_exception will only work in typemaps using {} delimeters.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7342 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-07-22 21:27:33 +00:00
John Lenz
a09045ab5c Some updates to the chicken documenatation, a few more fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7080 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-17 22:19:46 +00:00
Marcelo Matus
192e00615d More fix for warnings, and add some of the ideas of the Bill's 'labels' patch
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6998 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-24 23:48:20 +00:00
William S Fulton
4e685824fd C# exceptions - wider range of exceptions to throw
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6986 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-22 22:57:39 +00:00
William S Fulton
c8b6a0687c Fixes to SWIG_exception for C# and Java
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6951 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-15 22:09:06 +00:00
Marcelo Matus
331ace4bf8 fix comment to work with old C compilers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6350 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-06 17:34:51 +00:00
Marcelo Matus
c6f20f2306 fix vector slice/del problems
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6338 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-06 02:31:31 +00:00
Matthias Köppe
0f3b839af9 Fix typo.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5887 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-26 14:07:02 +00:00
Marcelo Matus
2f298a330a added the SWIG_CATCH_STDEXCEPT macro to map stdexcept -> SWIG_exception
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5628 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-13 01:41:19 +00:00
William S Fulton
cd940e3a13 Fixes to comply with with ISO/IEC 14882:1998(E) 17.4.3.1.2 :
_SWIG_Exception => SWIG_Exception_


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5142 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-23 21:13:27 +00:00
William S Fulton
dbb7096b05 Support for throwing C# exceptions from C/C++
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5019 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-29 20:05:15 +00:00
Jonah Beckford
d03f4a7db7 Defined SWIG_exception for for CHICKEN.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4315 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-15 01:59:47 +00:00
Dave Beazley
12a43edc2d The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2002-11-30 22:01:28 +00:00
Matthias Köppe
66b7d171d7 [Guile] Changed SCHEME_NAME to FUNC_NAME.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@866 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-09-20 14:00:56 +00:00
Harco de Hilster
33247d0e3c added java exception support submitted by Tal Shalif <tal@slt.atr.co.jp>
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@614 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-08-04 08:21:20 +00:00
Thien-Thi Nguyen
dfba9a8d7b Add exception support for Guile.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@410 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-04-12 11:01:37 +00:00
Dave Beazley
d1968e1dcb Added braces around some macros.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@227 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-02-11 19:48:14 +00:00
Dave Beazley
4e317b85af Added files
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@39 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-01-11 21:15:54 +00:00