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>2009-04-21 03:27:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-21 03:27:53 +0400
commit720f7a8b6900787734d11cff396945f693961250 (patch)
treeb13e47e983b6e7e0b2b2cc745abece800fc5900e /source/gameengine/Ketsji/KX_PythonInit.cpp
parent217bbb7800679899302ddb058f9ceea1d00c7ce1 (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/Ketsji/KX_PythonInit.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 9649e50a98b..873e49be6bb 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -216,13 +216,13 @@ static PyObject* gPyGetSpectrum(PyObject*)
for (int index = 0; index < 512; index++)
{
- PyList_SetItem(resultlist, index, PyFloat_FromDouble(spectrum[index]));
+ PyList_SET_ITEM(resultlist, index, PyFloat_FromDouble(spectrum[index]));
}
}
else {
for (int index = 0; index < 512; index++)
{
- PyList_SetItem(resultlist, index, PyFloat_FromDouble(0.0));
+ PyList_SET_ITEM(resultlist, index, PyFloat_FromDouble(0.0));
}
}