Upstream version 1.3.40
[profile/ivi/swig.git] / Examples / xml / example_apply.i
1 /* File : example.i */
2 %module example
3
4 /* This example illustrates a couple of different techniques
5    for manipulating C pointers */
6
7 /* First we'll use the pointer library */
8 extern void add(int *x, int *y, int *result);
9 %include pointer.i
10
11 /* Next we'll use some typemaps */
12
13 %include typemaps.i
14 extern void sub(int *INPUT, int *INPUT, int *OUTPUT);
15
16 /* Next we'll use typemaps and the %apply directive */
17
18 %apply int *OUTPUT { int *r };
19 extern int divide(int n, int d, int *r);
20
21
22
23