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:
Marcelo Matus 2004-11-04 18:44:41 +00:00
commit f81cf97c35
3 changed files with 52 additions and 3 deletions

View file

@ -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