fix private new operator
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6658 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
44009421a8
commit
f81cf97c35
3 changed files with 52 additions and 3 deletions
|
|
@ -20,6 +20,27 @@
|
|||
%}
|
||||
|
||||
|
||||
%inline %{
|
||||
class TROOT {
|
||||
protected:
|
||||
void *operator new(size_t l) { return malloc(sizeof(TROOT)); }
|
||||
|
||||
public:
|
||||
TROOT()
|
||||
{
|
||||
}
|
||||
|
||||
TROOT(const char *name, const char *title, void *initfunc = 0)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class A : public TROOT
|
||||
{
|
||||
};
|
||||
|
||||
%}
|
||||
|
||||
#ifdef SWIGPYTHON
|
||||
|
||||
// This case only works in python
|
||||
|
|
@ -32,4 +53,5 @@
|
|||
|
||||
%}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue