/tags/rel-1.3.35/Examples/test-suite/typedef_scope.i
Swig | 37 lines | 24 code | 13 blank | 0 comment | 0 complexity | c44fd8ed9b4f226bc29ac18e8f504115 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- // Tests some subtle issues of typedef scoping in C++
- %module typedef_scope
- %inline %{
- typedef char * FooType;
- class Bar {
- public:
- typedef int FooType;
- FooType test1(FooType n, ::FooType data) {
- return n;
- }
- ::FooType test2(FooType n, ::FooType data) {
- return data;
- }
- };
- class Foo
- {
- };
- typedef Foo FooBar;
- class CBaz
- {
- public:
- typedef FooBar Foo;
- };
- %}