git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4562 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2003-03-17 17:56:53 +00:00
commit 812f140923
2 changed files with 21 additions and 0 deletions

View file

@ -244,6 +244,7 @@ C_TEST_CASES += \
defineop \
defines \
enum \
function_typedef \
lib_carrays \
lib_cdata \
lib_cmalloc \

View file

@ -0,0 +1,20 @@
%module function_typedef
%inline %{
typedef int binop_t(int, int);
int do_binop1(binop_t f, int x, int y) {
return f(x,y);
}
int do_binop2(binop_t *f, int x, int y) {
return (*f)(x,y);
}
int do_binop3(int f(int,int), int x, int y) {
return f(x,y);
}
%}