Go, Guile, Racket, Scilab: Add throws typemaps for std::string so that
thrown string exception messages can be seen.
Test all language for std::string throws typemaps
Support running testcases conditional on the compiler supporting
a each language version, like we already handle C++11.
Currently no testcases are actually run in this way for these
newer language versions.
The directorin typemaps in the director methods now use std::move on the
input parameter when copying the object from the stack to the heap prior
to the callback into the target language, thereby taking advantage of
move semantics if available.
Move HAVE_CXX11 into makefiles so that running test-suite
from top level directory or in the language's test-suite directory
is consistent. For example, running 'make check-java-test-suite'
behaves the same as 'cd Examples/test-suite/java && make check'.
Problem here seems to be one also affecting other ocaml broken tests:
1. Enum value names should be using sym:name not name (ie %rename is broken for ocaml enum items)
2. directorin typemaps are not correct
template_typedef_cplx2 files are generated by the template_typedef_import.multicpptest
but can also be cleaned by the template_typedef_cplx2.cpptest target.
Fixes wrapping overloaded functions/constructors where a vararg
function is declared after a non-vararg function.
This is a long standing bug in the Python layer exposed since fastunpack
was turned on by default.
Add a typecheck typemap for size_t and const size_t &.
Add the const qualifier to the typemaps for primitive reference
types.
Add multiple runtime tests.
Prevent segfaults when too few arguments are passed to a function.
Length checks are not needed for the wrappers of overloaded
functions -- the generated dispatch function already checks.
Add default_args_runme.ml.
Fix minor errors in some runtime tests. Extra args were being passed
in some cases.
The OCaml module's typemaps.i supplied argout typemaps for some
reference types (e.g. int &) by default, which was unintuitive and
inconsistent when compared with other modules. The argout_ref example
depended on this, so add a typemap to argout_ref/example.i.
Add multiple runtime tests that deal with references.
* ZackerySpytz-OCaml-classDirectorMethod-CAMLreturn:
[OCaml] Fix possible GC issues in generated director code
Conflicts:
Examples/test-suite/ocaml/director_unroll_runme.ml
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.
If a class was given the director feature, it was not possible
to use ctors with multiple parameters.
Add director_default_runme.ml (it is based on
director_default_runme.java).
Add a directorin typemap for SWIGTYPE.
Add director_frob_runme.ml, director_pass_by_value_runme.ml, and
director_unroll_runme.ml.
This commit fixes most of the director-related warnings in the OCaml
test suite. Of the director tests that are currently included in the
OCaml test suite, director_basic and director_property are the only
ones which give warnings (due to issues with typecheck typemaps).
Add %typemap(in) (char *STRING, size_t LENGTH).
Fix warnings in char_binary.i.
./../char_binary.i:7: Warning 453: Can't apply (char *STRING,size_t LENGTH). No typemaps are defined.
./../char_binary.i:8: Warning 453: Can't apply (char *STRING,size_t LENGTH). No typemaps are defined.
Add a runtime test (it is based on the Python and Go char_binary
runtime tests).
The OCaml module was generating invalid code for director classes
which contain methods with exception specifications. The fix is based
on some of the code in python.cxx's classDirectorMethod().
This commit fixes compilation failures for a number of director unit
tests.
Add director_exception_catches_runme.ml,
director_exception_nothrow_runme.ml, and director_ignore_runme.ml.
OCaml's variableWrapper() wasn't calling emit_action_code() for
in/out typemaps, which meant that %allowexception was being ignored.
In addition, remove all comments in the typemaps in Lib/ocaml. In the
case of the allowexcept test, one of the typemap comments caused
compilation to fail because it became nested within another comment
in an %exception block.
Re-enable the allowexcept test.
Add allowexcept_runme.ml.