summaryrefslogtreecommitdiff
path: root/Examples/test-suite/voidtest.i
blob: d792f415199132c5604e84ac5708ecadb7767db9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
%module voidtest

%inline %{

void globalfunc(void) {
}

class Foo {
public:
   Foo(void) { }
   void memberfunc(void) { }
   void* get_this() { return this; }
   static void staticmemberfunc(void) { }
};


void *vfunc1(void *f) { return f; }
void *vfunc2(Foo *f) { return f; }
Foo  *vfunc3(void *f) { return (Foo *) f; }
Foo  *vfunc4(Foo *f) { return f; }

bool test_pointers_equal(void *a, void *b) { return a == b; }

%}