Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-06-06 05:15:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-06-06 05:15:44 +0400
commited338da8c963cfcc26315584bb694a95f2c89088 (patch)
treee21a68328e7d0d1f4d41f95fd27690172bfc0957 /source/gameengine/Expressions/PyObjectPlus.h
parent0cc077ec455e701a1d3caa1350051f7d3737763b (diff)
- WITH_CXX_GUARDEDALLOC working again
- CMake building without python or fluidsim working again (broke in recent commit) - remove BLI_short_filename(), it wasnt used anywhere.
Diffstat (limited to 'source/gameengine/Expressions/PyObjectPlus.h')
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index e19f4800ca5..7afa85c8c31 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -135,8 +135,8 @@ typedef struct PyObjectPlus_Proxy {
// leave above line empty (macro)!
#ifdef WITH_CXX_GUARDEDALLOC
#define Py_Header __Py_Header \
- void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, Type.tp_name); } \
- void operator delete( void *mem ) { MEM_freeN(mem); } \
+ void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, Type.tp_name); } \
+ void operator delete(void *mem) { MEM_freeN(mem); } \
#else
#define Py_Header __Py_Header
@@ -144,7 +144,7 @@ typedef struct PyObjectPlus_Proxy {
#ifdef WITH_CXX_GUARDEDALLOC
#define Py_HeaderPtr __Py_HeaderPtr \
- void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, Type.tp_name); } \
+ void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, Type.tp_name); } \
void operator delete( void *mem ) { MEM_freeN(mem); } \
#else
@@ -466,16 +466,17 @@ typedef PyTypeObject * PyParentObject; // Define the PyParent Object
#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); } \
#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); } \
#endif
-
// By making SG_QList the ultimate parent for PyObjectPlus objects, it
// allows to put them in 2 different dynamic lists at the same time
// The use of these links is interesting because they free of memory allocation