new test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4562 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2e6abf1f5d
commit
812f140923
2 changed files with 21 additions and 0 deletions
|
|
@ -244,6 +244,7 @@ C_TEST_CASES += \
|
|||
defineop \
|
||||
defines \
|
||||
enum \
|
||||
function_typedef \
|
||||
lib_carrays \
|
||||
lib_cdata \
|
||||
lib_cmalloc \
|
||||
|
|
|
|||
20
Examples/test-suite/function_typedef.i
Normal file
20
Examples/test-suite/function_typedef.i
Normal 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);
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue