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:
Marcelo Matus 2004-11-05 00:22:29 +00:00
commit 5b3e4bc601
3 changed files with 41 additions and 0 deletions

View file

@ -266,6 +266,7 @@ CPP_TEST_CASES += \
typedef_scope \
typemap_namespace \
typemap_ns_using \
typemap_numinputs \
typename \
union_scope \
using1 \

View 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;
}
%}