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.
13 lines
334 B
OpenEdge ABL
13 lines
334 B
OpenEdge ABL
/* File : example.i */
|
|
%module example
|
|
|
|
%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(const int &x, const int &y);
|
|
%}
|
|
|
|
extern "C" void factor(const int &x, const int &y);
|