PageRenderTime 31ms CodeModel.GetById 18ms app.highlight 11ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1.3.35/Examples/test-suite/typemap_numinputs.i

#
Swig | 37 lines | 30 code | 7 blank | 0 comment | 0 complexity | 560bc05f246a18d322327535119c44d9 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1%module typemap_numinputs
 2
 3
 4%typemap(in, numinputs=1) (char *STR, int LEN)(int temp = 0)
 5{
 6  temp = 1;
 7  $2 = 0;
 8  $1 = 0;
 9}
10
11%typemap(in) (int *OUTPUT)  (int temp = 0)
12{
13  temp = 2;
14  $1 = &temp;
15}
16
17%typemap(argout) (int *OUTPUT)
18{
19  ++temp$argnum;
20}
21
22%typemap(argout, numinputs=1) (char *STR, int LEN)
23{
24  ++temp$argnum;
25}
26
27%typemap(in) int hello
28{
29  $1 = 0;
30}
31
32%inline %{
33  int this_breaks(int hello, char *STR, int LEN, int *OUTPUT)
34  {
35    return LEN;
36  }
37%}