Commit graph

12 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
Zackery Spytz
d5afcab9a6 [OCaml] Some %typecheck precedence tweaks
Fix warnings in overload_numeric.i.

./../overload_numeric.i:36: Warning 509: Overloaded method Nums::over(short) effectively ignored,
./../overload_numeric.i:33: Warning 509: as it is shadowed by Nums::over(signed char).
./../overload_numeric.i:39: Warning 509: Overloaded method Nums::over(int) effectively ignored,
./../overload_numeric.i:33: Warning 509: as it is shadowed by Nums::over(signed char).

Add overload_numeric_runme.ml.
2019-01-21 23:17:43 -07:00
Zackery Spytz
6da9bd485e [OCaml] Remove the last remnants of libswigocaml
Parts of it were removed in 79785d403c

Remove the oc_bool type.
2019-01-18 23:48:46 -07:00
Zackery Spytz
b879ccdc3e [OCaml] Fix the handling of bools in overloaded functions
Use the SWIG_TYPECHECK_BOOL precedence level instead of
SWIG_TYPECHECK_INTEGER when checking for bools.

Add a runtime test in the form of overload_bool_runme.ml.
2019-01-18 23:42:59 -07:00
William S Fulton
8bdfcda66e Add rvalue reference typemaps 2013-01-24 20:27:28 +00:00
William S Fulton
7f53260203 merge revisions 11872:11876 from trunk to gsoc2009-matevz branch - license changes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11905 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-06 00:51:54 +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
219517adc0 warning/error fixes for Visual Studio
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7543 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-28 20:58:41 +00:00
Art Yerkes
f7d59cab5d All but four test cases work. I'm going to leave these for afterward.
I've moved completely away from the "value" type to "caml_value_t".  Although
a bit painful, this will make things easier for me.  I seem to be seeing
quite a few things that use the word value as a function, type, etc, and
wanted to get something that doesn't collide.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4593 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-20 20:51:05 +00:00
Art Yerkes
88b15ce253 corrections for std::string.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4325 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-16 13:32:40 +00:00
Art Yerkes
d69f24e750 typecheck: Foolish omission of break;
mlheading and mliheading: added make_x and get_x accessor and constructor
functions for C_xxx types.  This makes the system a bit more accomodating.
ocaml.swg: Corrected one SWIGSTATIC
std_vector.i: First shot at a working implementation (with example).
typemaps.i: Correction to handling of SWIGTYPE ...


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4320 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-16 07:29:34 +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