/trunk/Examples/php/pointer/example.i
Swig | 24 lines | 7 code | 11 blank | 6 comment | 0 complexity | 6f2247aae5daca7a2bdc334252bed10c MD5 | raw file
1/* File : example.i */ 2%module example 3 4/* This example illustrates a couple of different techniques 5 for manipulating C pointers */ 6 7%include phppointers.i 8/* First we'll use the pointer library */ 9extern void add(double *REF, double *REF, double *REF); 10 11/* Next we'll use some typemaps */ 12 13%include typemaps.i 14extern 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 24