import source from 1.3.40
[external/swig.git] / Examples / octave / funcptr / example.i
1 /* File : example.i */
2 %module example
3 %{
4 #include "example.h"
5 %}
6
7 /* Wrap a function taking a pointer to a function */
8 extern int  do_op(int a, int b, int (*op)(int, int));
9
10 /* Now install a bunch of "ops" as constants */
11 %constant int (*ADD)(int,int) = add;
12 %constant int (*SUB)(int,int) = sub;
13 %constant int (*MUL)(int,int) = mul;
14
15 extern int (*funcvar)(int,int);
16