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/Ketsji/KX_GameObject.cpp | |
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/Ketsji/KX_GameObject.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index d3ed9991c31..c240a7fcf84 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1880,7 +1880,7 @@ PyTypeObject KX_GameObject::Type = { PyObject* KX_GameObject::pyattr_get_name(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { KX_GameObject* self= static_cast<KX_GameObject*>(self_v); - return PyUnicode_FromString(self->GetName().ReadPtr()); + return PyUnicode_From_STR_String(self->GetName()); } PyObject* KX_GameObject::pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) @@ -2683,7 +2683,7 @@ PyObject* KX_GameObject::PyGetPhysicsId() PyObject* KX_GameObject::PyGetPropertyNames() { - PyObject *list= ConvertKeysToPython(); + PyObject *list= ConvertKeysToPython(); if(m_attr_dict) { PyObject *key, *value; |