diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-06 05:39:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-06 05:39:36 +0400 |
commit | 4c17f8e5de94f3abc65995e7a2964bb9e6ea7642 (patch) | |
tree | 001add4dd98c14818079e5f591d584c5ece7ac6a /source/gameengine/Expressions/Expression.h | |
parent | 2a7ade9de24860bbd13e4be8480e9285d1f3fe4c (diff) |
PyUnicode_From_STR_String utility function which passes STR_String to PyUnicode_FromStringAndSize (saves a call to strlen).
Also made CValue::ConvertKeysToPython use faster list creation and improved some of the macro formatting.
Diffstat (limited to 'source/gameengine/Expressions/Expression.h')
-rw-r--r-- | source/gameengine/Expressions/Expression.h | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/source/gameengine/Expressions/Expression.h b/source/gameengine/Expressions/Expression.h index 875bd758b68..b9232477c34 100644 --- a/source/gameengine/Expressions/Expression.h +++ b/source/gameengine/Expressions/Expression.h @@ -24,19 +24,25 @@ //extern int gRefCountExpr; // only for debugging purposes (detect mem.leaks) -#define PLUGIN_DECLARE_SERIAL_EXPRESSION(class_name,base_class_name) \ -public: \ - virtual base_class_name * Copy() { return new class_name; } \ - virtual bool EdSerialize(CompressorArchive& arch,class CFactoryManager* facmgr,bool bIsStoring); \ - virtual bool EdIdSerialize(CompressorArchive& arch,class CFactoryManager* facmgr,bool bIsStoring) \ -{ \ - if (bIsStoring) \ - { \ - unsigned char exprID = GetExpressionID(); \ - arch << exprID; \ - } \ - return true; \ -} \ +#define PLUGIN_DECLARE_SERIAL_EXPRESSION(class_name, base_class_name) \ +public: \ + virtual base_class_name * Copy() { \ + return new class_name; \ + } \ + virtual bool EdSerialize(CompressorArchive& arch, \ + class CFactoryManager* facmgr, \ + bool bIsStoring); \ + virtual bool EdIdSerialize(CompressorArchive& arch, \ + class CFactoryManager* facmgr, \ + bool bIsStoring) \ + { \ + if (bIsStoring) \ + { \ + unsigned char exprID = GetExpressionID(); \ + arch << exprID; \ + } \ + return true; \ + } \ |