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/GameLogic/SCA_PythonMouse.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/GameLogic/SCA_PythonMouse.cpp')
-rw-r--r-- | source/gameengine/GameLogic/SCA_PythonMouse.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/GameLogic/SCA_PythonMouse.cpp b/source/gameengine/GameLogic/SCA_PythonMouse.cpp index 0806bda072b..1617f714113 100644 --- a/source/gameengine/GameLogic/SCA_PythonMouse.cpp +++ b/source/gameengine/GameLogic/SCA_PythonMouse.cpp @@ -100,7 +100,7 @@ PyObject *SCA_PythonMouse::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_ { const SCA_InputEvent & inevent = self->m_mouse->GetEventValue((SCA_IInputDevice::KX_EnumInputs)i); - PyDict_SetItem(self->m_event_dict, PyLong_FromSsize_t(i), PyLong_FromSsize_t(inevent.m_status)); + PyDict_SetItem(self->m_event_dict, PyLong_FromLong(i), PyLong_FromLong(inevent.m_status)); } Py_INCREF(self->m_event_dict); return self->m_event_dict; @@ -117,7 +117,7 @@ PyObject *SCA_PythonMouse::pyattr_get_active_events(void *self_v, const KX_PYATT const SCA_InputEvent & inevent = self->m_mouse->GetEventValue((SCA_IInputDevice::KX_EnumInputs)i); if (inevent.m_status != SCA_InputEvent::KX_NO_INPUTSTATUS) - PyDict_SetItem(self->m_event_dict, PyLong_FromSsize_t(i), PyLong_FromSsize_t(inevent.m_status)); + PyDict_SetItem(self->m_event_dict, PyLong_FromLong(i), PyLong_FromLong(inevent.m_status)); } Py_INCREF(self->m_event_dict); return self->m_event_dict; |