projects
/
external
/
swig.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
import source from 1.3.40
[external/swig.git]
/
Examples
/
octave
/
funcptr2
/
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
%callback("%(upper)s");
12
int add(int, int);
13
int sub(int, int);
14
int mul(int, int);
15
%nocallback;
16
17
extern int (*funcvar)(int,int);
18