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:
parent
f84342a301
commit
f03e17b405
4 changed files with 45 additions and 13 deletions
12
Lib/c/c.swg
12
Lib/c/c.swg
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue