fix typemap + numinputs +argout
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6669 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9d3cce855e
commit
5b3e4bc601
3 changed files with 41 additions and 0 deletions
|
|
@ -266,6 +266,7 @@ CPP_TEST_CASES += \
|
|||
typedef_scope \
|
||||
typemap_namespace \
|
||||
typemap_ns_using \
|
||||
typemap_numinputs \
|
||||
typename \
|
||||
union_scope \
|
||||
using1 \
|
||||
|
|
|
|||
37
Examples/test-suite/typemap_numinputs.i
Normal file
37
Examples/test-suite/typemap_numinputs.i
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
%module typemap_numinputs
|
||||
|
||||
|
||||
%typemap(in, numinputs=1) (char *STR, int LEN)(int temp = 0)
|
||||
{
|
||||
temp = 1;
|
||||
$2 = 0;
|
||||
$1 = 0;
|
||||
}
|
||||
|
||||
%typemap(in) (int *OUTPUT) (int temp = 0)
|
||||
{
|
||||
temp = 2;
|
||||
$1 = &temp;
|
||||
}
|
||||
|
||||
%typemap(argout) (int *OUTPUT)
|
||||
{
|
||||
temp$argnum;
|
||||
}
|
||||
|
||||
%typemap(argout, numinputs=1) (char *STR, int LEN)
|
||||
{
|
||||
temp$argnum;
|
||||
}
|
||||
|
||||
%typemap(in) int hello
|
||||
{
|
||||
$1 = 0;
|
||||
}
|
||||
|
||||
%inline %{
|
||||
int this_breaks(int hello, char *STR, int LEN, int *OUTPUT)
|
||||
{
|
||||
return LEN;
|
||||
}
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue