git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4550 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2003-03-16 03:55:36 +00:00
commit 3a75cd354e
3 changed files with 24 additions and 3 deletions

View file

@ -152,6 +152,7 @@ CPP_TEST_CASES += \
return_value_scope \ return_value_scope \
rname \ rname \
smart_pointer_const \ smart_pointer_const \
smart_pointer_const2 \
smart_pointer_multi \ smart_pointer_multi \
smart_pointer_multi_typedef \ smart_pointer_multi_typedef \
smart_pointer_not \ smart_pointer_not \

View file

@ -1,17 +1,17 @@
%module preproc_4 %module preproc_4
%{ %{
inline int hello0() int hello0()
{ {
return 0; return 0;
} }
inline int hello1() int hello1()
{ {
return 1; return 1;
} }
inline int hello2() int hello2()
{ {
return 2; return 2;
} }

View file

@ -0,0 +1,20 @@
%module smart_pointer_const2
%inline %{
struct Foo {
int x;
int getx() const { return x; }
int test() { return x; }
};
class Bar {
Foo *f;
public:
Bar(Foo *f) : f(f) { }
const Foo *operator->() {
return f;
}
};
%}