diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-21 03:27:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-21 03:27:53 +0400 |
commit | 720f7a8b6900787734d11cff396945f693961250 (patch) | |
tree | b13e47e983b6e7e0b2b2cc745abece800fc5900e /source/gameengine/GameLogic/SCA_KeyboardSensor.cpp | |
parent | 217bbb7800679899302ddb058f9ceea1d00c7ce1 (diff) |
use PyList_SET_ITEM instead of PyList_SetItem,
PyList_SetItem does error checking and decref's existing values, PyList_SET_ITEM is a macro for direct assignment, only for use on new lists.
Diffstat (limited to 'source/gameengine/GameLogic/SCA_KeyboardSensor.cpp')
-rw-r--r-- | source/gameengine/GameLogic/SCA_KeyboardSensor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp index 96969dc6dc7..2048731f73c 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp @@ -694,7 +694,7 @@ PyObject* SCA_KeyboardSensor::pyattr_get_events(void *self_v, const KX_PYATTRIBU { PyObject* keypair = PyList_New(2); PyList_SET_ITEM(keypair,0,PyInt_FromLong(i)); - PyList_SetItem(keypair,1,PyInt_FromLong(inevent.m_status)); + PyList_SET_ITEM(keypair,1,PyInt_FromLong(inevent.m_status)); PyList_Append(resultlist,keypair); } } |