diff options
Diffstat (limited to 'Examples/test-suite/li_attribute.i')
-rw-r--r-- | Examples/test-suite/li_attribute.i | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Examples/test-suite/li_attribute.i b/Examples/test-suite/li_attribute.i index 4f9497afb..95389b2b6 100644 --- a/Examples/test-suite/li_attribute.i +++ b/Examples/test-suite/li_attribute.i @@ -95,6 +95,7 @@ struct MyFoo; // %attribute2 does not work with templates // class/struct attribute with get/set methods using return/pass by reference %attribute2(MyClass, MyFoo, Foo, GetFoo, SetFoo); +%attribute2ref(MyClass, MyFoo, Foo2); %inline %{ struct MyFoo { MyFoo() : x(-1) {} @@ -102,9 +103,11 @@ struct MyFoo; // %attribute2 does not work with templates }; class MyClass { MyFoo foo; + MyFoo foo2; public: MyFoo& GetFoo() { return foo; } void SetFoo(const MyFoo& other) { foo = other; } + MyFoo& Foo2() { return foo2; } }; %} |