more smart pointers + extend fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6919 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d13e837d8e
commit
70d3bde16b
2 changed files with 27 additions and 22 deletions
|
|
@ -99,30 +99,32 @@ public:
|
|||
|
||||
|
||||
%inline %{
|
||||
|
||||
class DFoo;
|
||||
|
||||
class DPtrFoo
|
||||
{
|
||||
DFoo *p;
|
||||
public:
|
||||
DPtrFoo(DFoo *ptr) : p(ptr)
|
||||
{
|
||||
}
|
||||
namespace foo {
|
||||
|
||||
DFoo* operator->(void) {return p;};
|
||||
};
|
||||
|
||||
class DFoo
|
||||
{
|
||||
public:
|
||||
void F(void) {};
|
||||
};
|
||||
|
||||
class DFoo;
|
||||
|
||||
class DPtrFoo
|
||||
{
|
||||
DFoo *p;
|
||||
public:
|
||||
DPtrFoo(DFoo *ptr) : p(ptr)
|
||||
{
|
||||
}
|
||||
|
||||
DFoo* operator->(void) {return p;};
|
||||
};
|
||||
|
||||
class DFoo
|
||||
{
|
||||
public:
|
||||
void F(void) {};
|
||||
};
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
%extend DFoo {
|
||||
|
||||
%extend foo::DFoo {
|
||||
static int SExt(int i = 1) {return i;};
|
||||
int Ext(int i = 2) {return i;};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue