added support for passing function pointers as well as native lua object

into wrappered function
added example funcptr3


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9264 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Mark Gossage 2006-09-11 06:45:03 +00:00
commit db5bb83440
8 changed files with 312 additions and 0 deletions

View file

@ -0,0 +1,19 @@
/* File : example.c */
int do_op(int a, int b, int (*op)(int,int)) {
return (*op)(a,b);
}
int add(int a, int b) {
return a+b;
}
int sub(int a, int b) {
return a-b;
}
int mul(int a, int b) {
return a*b;
}
int (*funcvar)(int,int) = add;