Support for parameter passing by value, pointer and reference.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@10604 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Maciej Drwal 2008-06-28 20:48:40 +00:00
commit f03e17b405
4 changed files with 45 additions and 13 deletions

View file

@ -12,11 +12,21 @@
%typemap(ctype) float "float"
%typemap(ctype) double "double"
%typemap(ctype) bool "_Bool"
%typemap(ctype) SWIGTYPE "struct $*1_typeObj *"
%typemap(ctype) SWIGTYPE "struct $1_typeObj *"
%typemap(ctype) SWIGTYPE * "struct $*1_typeObj *"
%typemap(ctype) SWIGTYPE & "struct $*1_ltypeObj *"
%typemap(in) short, int, long, char, float, double, bool "$1 = $input;"
%typemap(in) SWIGTYPE {
$1 = * ($1_type *) ($input->obj);
}
%typemap(in) SWIGTYPE * {
$1 = ($1_type) $input->obj;
}
%typemap(in) SWIGTYPE & {
$1 = ($*1_ltype *) $input->obj;
}