Commit graph

16 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
Daniel Vollmer
ce1cb85d86 Add <typeinfo> header for std::bad_cast 2016-09-17 13:24:32 +02:00
Daniel Vollmer
2dc87d7485 Add std::bad_cast to std_except.i
This exception occurs when dynamic_cast<T&> fails.

Fixes #783.
2016-09-17 10:26:54 +02: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
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
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
William S Fulton
db210a1fa0 Make sure guile doesn't use this file either. It does not work for Guile.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8305 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-08 21:19:55 +00:00
William S Fulton
f2eeedf1c0 Make sure this file is not included by Java or C# (std_deque.i) was using it after recent commits
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8302 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-08 20:07:51 +00:00
Marcelo Matus
33b23a6965 clarify the use of std_except.i, now it has nothing to do with supporting the STD/STL namespace
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8236 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-06 01:49:10 +00:00
Marcelo Matus
a24a1d922f add missing ; detected by improper inclusion of this file via stl.i
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8231 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-06 00:33:03 +00:00
Marcelo Matus
20af03cd45 add missing ; detected by improper inclusion of this file via stl.i
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8230 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-06 00:27:49 +00:00
William S Fulton
c574b94787 More subtle exception fixes for C# and Java. Workarournd for the wrong std_except.i file is being %include'd from java/stl.i and csharp/stl.i.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8222 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-05 22:02:14 +00:00
Marcelo Matus
a1d10b8e39 add more std::exception typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7906 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-30 21:54:26 +00:00
Marcelo Matus
d8f959828d fix li_std_except.i test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7905 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-30 21:45:41 +00:00