/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. /* This example illustrates a couple of different techniques
  4. for manipulating C pointers */
  5. %include phppointers.i
  6. /* First we'll use the pointer library */
  7. extern void add(double *REF, double *REF, double *REF);
  8. /* Next we'll use some typemaps */
  9. %include typemaps.i
  10. extern void sub(int *INPUT, int *INPUT, int *OUTPUT);
  11. /* Next we'll use typemaps and the %apply directive */
  12. //%apply int *OUTPUT { int *r };
  13. //extern int divide(int n, int d, int *r);