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>2012-11-21 06:28:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-21 06:28:36 +0400
commit3fd388fb06e474a4e9e2f6816eb0a0b95ab433e7 (patch)
tree214a3ade3c842bc301aa6bedf7f3f826c873b2a6 /source/gameengine/Ketsji/KX_GameObject.cpp
parent387bb73e4343be164f167565cefebbee613cdb7b (diff)
py api cleanup, replace use...
- PyLong_FromSsize_t --> PyLong_FromLong - PyLong_AsSsize_t --> PyLong_AsLong In all places except for those where python api expects PySsize_t (index lookups mainly). - use PyBool_FromLong in a few areas of the BGE. - fix incorrect assumption in the BGE that PySequence_Check() means PySequence_Fast_ functions can be used.
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index cfccb8e8ced..c7f6954fd6c 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -2475,13 +2475,13 @@ PyObject *KX_GameObject::pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF
KX_GameObject* self = static_cast<KX_GameObject*>(self_v);
int state = 0;
state |= self->GetState();
- return PyLong_FromSsize_t(state);
+ return PyLong_FromLong(state);
}
int KX_GameObject::pyattr_set_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
KX_GameObject* self = static_cast<KX_GameObject*>(self_v);
- int state_i = PyLong_AsSsize_t(value);
+ int state_i = PyLong_AsLong(value);
unsigned int state = 0;
if (state_i == -1 && PyErr_Occurred()) {
@@ -2897,7 +2897,7 @@ PyObject *KX_GameObject::PyGetPhysicsId()
{
physid= (uint_ptr)ctrl->GetUserData();
}
- return PyLong_FromSsize_t((long)physid);
+ return PyLong_FromLong((long)physid);
}
PyObject *KX_GameObject::PyGetPropertyNames()