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>2017-08-20 08:28:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-08-20 08:30:14 +0300
commit2ff9c8a3bc51142a1d7ad19d8b772b58e4dcc890 (patch)
tree22a3a09834e00eee0bbff70b3c42103b86915628
parent07ca9860e23a833080582473539b0e5fc826dc19 (diff)
PyAPI: avoid redundant PyLong_AsLong call
Assigning to an RNA array converted from Python to C twice.
-rw-r--r--source/blender/python/intern/bpy_rna.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 67f2f1fdee6..0d3781ca176 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -2712,7 +2712,7 @@ static PyObject *pyrna_prop_array_subscript(BPy_PropertyArrayRNA *self, PyObject
Py_ssize_t i = PyNumber_AsSsize_t(key, PyExc_IndexError);
if (i == -1 && PyErr_Occurred())
return NULL;
- return pyrna_prop_array_subscript_int(self, PyLong_AsLong(key));
+ return pyrna_prop_array_subscript_int(self, i);
}
else if (PySlice_Check(key)) {
Py_ssize_t step = 1;