add SWIG_TYPECHECK_SWIGOBJECT to resolve simple overload functions as Graph(int i)/Graph(PyObject* p)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8925 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
157f655be6
commit
22d022c7de
1 changed files with 16 additions and 0 deletions
|
|
@ -178,3 +178,19 @@ long long ll(long long ull) { return ull; }
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SWIGPYTHON
|
||||||
|
%inline
|
||||||
|
{
|
||||||
|
class Graph {
|
||||||
|
public:
|
||||||
|
int val;
|
||||||
|
Graph(int i) : val(i) {};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
%extend Graph {
|
||||||
|
Graph(PyObject* p) { return new Graph(123);}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue