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

%inline %{
struct Foo {
   int x;
   int getx() { return x; }
};

typedef Foo *FooPtr;

class Bar {
   Foo *f;
public:
   Bar(Foo *f) : f(f) { }
   FooPtr operator->() {
      return f;
   }
};
%}