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

%inline 
%{
namespace nspace1 {
  typedef struct _AffineMatrix {
    int x, y, z;
  } AffineMatrix;

  struct _CacheView {
    int x;
  };
  typedef struct _CacheView CacheView;
}

using nspace1::AffineMatrix;
using nspace1::CacheView;

int fn1(AffineMatrix a) { return a.x; };
int fn2(CacheView a) { return a.x; };
%}