[OCaml] Fix the wrapmacro test
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.
This commit is contained in:
parent
6522afe90a
commit
10d62aecd5
10 changed files with 58 additions and 10 deletions
|
|
@ -1,13 +1,13 @@
|
|||
/* File : example.i */
|
||||
%module example
|
||||
|
||||
%typemap(argout) (int &x, int &y) {
|
||||
%typemap(argout) (const int &x, const int &y) {
|
||||
swig_result = caml_list_append(swig_result, caml_val_int(*$1));
|
||||
swig_result = caml_list_append(swig_result, caml_val_int(*$2));
|
||||
}
|
||||
|
||||
%{
|
||||
extern "C" void factor(int &x, int &y);
|
||||
extern "C" void factor(const int &x, const int &y);
|
||||
%}
|
||||
|
||||
extern "C" void factor(int &x, int &y);
|
||||
extern "C" void factor(const int &x, const int &y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue