From cc0784c1b9c4d813837dedddd5b2b4c52fe291f0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 25 Jun 2012 09:14:37 +0000 Subject: optionally use guarded alloc for tiles compositor, also replace allocation functions with a macro. --- source/gameengine/Expressions/PyObjectPlus.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'source/gameengine/Expressions/PyObjectPlus.h') diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index 124a8e28f57..af8acaa993f 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -534,21 +534,11 @@ typedef PyTypeObject *PyParentObject; /* Define the PyParent Object */ #ifdef WITH_CXX_GUARDEDALLOC #define Py_Header \ public: \ - void *operator new(size_t num_bytes) { \ - return MEM_mallocN(num_bytes, "GE:PyObjectPlus"); \ - } \ - void operator delete( void *mem ) { \ - MEM_freeN(mem); \ - } \ + MEM_CXX_CLASS_ALLOC_FUNCS("GE:PyObjectPlus") \ + #define Py_HeaderPtr \ -public: \ - void *operator new(size_t num_bytes) { \ - return MEM_mallocN(num_bytes, "GE:PyObjectPlusPtr"); \ - } \ - void operator delete( void *mem ) { \ - MEM_freeN(mem); \ - } \ + MEM_CXX_CLASS_ALLOC_FUNCS("GE:PyObjectPlusPtr") \ #else // WITH_CXX_GUARDEDALLOC -- cgit v1.2.3