diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2023-05-05 23:23:42 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2023-05-06 11:13:23 +0100 |
commit | 65be8812959aa0d2e9805e31549bbeac0cc89691 (patch) | |
tree | 0f7d8762c507517905f5344f57db725e96c263eb /Examples/test-suite/cpp11_using_typedef_struct.i | |
parent | 33b483492008b05b0625efb62cebb9ad5ae0638f (diff) | |
download | swig-65be8812959aa0d2e9805e31549bbeac0cc89691.tar.gz |
Partial revert of previous commit for typedefs
Setting current symbol table for a typedef seems wrong.
No difference to test-suite though.
Testcase rename for C++11 testing and minor adjustments.
Issue #2550
Closes #2551
Diffstat (limited to 'Examples/test-suite/cpp11_using_typedef_struct.i')
-rw-r--r-- | Examples/test-suite/cpp11_using_typedef_struct.i | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Examples/test-suite/cpp11_using_typedef_struct.i b/Examples/test-suite/cpp11_using_typedef_struct.i new file mode 100644 index 000000000..81efdc310 --- /dev/null +++ b/Examples/test-suite/cpp11_using_typedef_struct.i @@ -0,0 +1,21 @@ +%module cpp11_using_typedef_struct + +%inline +%{ +namespace nspace1 { + typedef struct _xAffineMatrix { + int x, y, z; + } AffineMatrix; + + struct _xCacheView { + int x; + }; + typedef struct _xCacheView CacheView; +} + +using nspace1::AffineMatrix; +using nspace1::CacheView; + +int fn1(AffineMatrix a) { return a.x; }; +int fn2(CacheView a) { return a.x; }; +%} |