4 /* This example illustrates a couple of different techniques
5 for manipulating C pointers */
7 /* First we'll use the pointer library */
8 extern void add(int *x, int *y, int *result);
11 /* Next we'll use some typemaps */
14 extern void sub(int *INPUT, int *INPUT, int *OUTPUT);
16 /* Next we'll use typemaps and the %apply directive */
18 %apply int *OUTPUT { int *r };
19 extern int divide(int n, int d, int *r);