diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-21 06:28:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-21 06:28:36 +0400 |
commit | 3fd388fb06e474a4e9e2f6816eb0a0b95ab433e7 (patch) | |
tree | 214a3ade3c842bc301aa6bedf7f3f826c873b2a6 /source/gameengine/Ketsji/KX_MeshProxy.cpp | |
parent | 387bb73e4343be164f167565cefebbee613cdb7b (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_MeshProxy.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_MeshProxy.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp index dbbf6bd8c2a..d83e98d4712 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.cpp +++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp @@ -172,7 +172,7 @@ PyObject *KX_MeshProxy::PyGetVertexArrayLength(PyObject *args, PyObject *kwds) length = m_meshobj->NumVertices(mat); } - return PyLong_FromSsize_t(length); + return PyLong_FromLong(length); } @@ -406,13 +406,13 @@ PyObject *KX_MeshProxy::pyattr_get_materials(void *self_v, const KX_PYATTRIBUTE_ PyObject * KX_MeshProxy::pyattr_get_numMaterials(void * selfv, const KX_PYATTRIBUTE_DEF * attrdef) { KX_MeshProxy * self = static_cast<KX_MeshProxy *> (selfv); - return PyLong_FromSsize_t(self->m_meshobj->NumMaterials()); + return PyLong_FromLong(self->m_meshobj->NumMaterials()); } PyObject * KX_MeshProxy::pyattr_get_numPolygons(void * selfv, const KX_PYATTRIBUTE_DEF * attrdef) { KX_MeshProxy * self = static_cast<KX_MeshProxy *> (selfv); - return PyLong_FromSsize_t(self->m_meshobj->NumPolygons()); + return PyLong_FromLong(self->m_meshobj->NumPolygons()); } /* a close copy of ConvertPythonToGameObject but for meshes */ |