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
%pointer_functions(int, intp);
13
/* Next we'll use some typemaps */
16
extern void sub(int *INPUT, int *INPUT, int *OUTPUT);
18
/* Next we'll use typemaps and the %apply directive */
20
//%apply int *OUTPUT { int *r };
21
//extern int divide(int n, int d, int *r);