diff options
Diffstat (limited to 'source/gameengine/Expressions/StringValue.h')
-rw-r--r-- | source/gameengine/Expressions/StringValue.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/gameengine/Expressions/StringValue.h b/source/gameengine/Expressions/StringValue.h index 52f8a580f4d..069eb8d9c24 100644 --- a/source/gameengine/Expressions/StringValue.h +++ b/source/gameengine/Expressions/StringValue.h @@ -40,12 +40,19 @@ public: virtual void SetValue(CValue* newval) { m_strString = newval->GetText(); SetModified(true); }; virtual CValue* GetReplica(); virtual PyObject* ConvertValueToPython() { - return PyString_FromString(m_strString.Ptr()); + return PyUnicode_FromString(m_strString.Ptr()); } private: // data member STR_String m_strString; + + +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:CStringValue"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; #endif |