[Bf-blender-cvs] [69c732c] tmp-id-users: Rename 'iter' since this is no longer an iterator
Campbell Barton
noreply at git.blender.org
Wed Jan 6 17:44:45 CET 2016
Commit: 69c732c58dd22bf1f2b7d92be536fa20d146affa
Author: Campbell Barton
Date: Thu Jan 7 03:37:32 2016 +1100
Branches: tmp-id-users
https://developer.blender.org/rB69c732c58dd22bf1f2b7d92be536fa20d146affa
Rename 'iter' since this is no longer an iterator
===================================================================
M source/blender/python/intern/bpy_rna_id_collection.c
===================================================================
diff --git a/source/blender/python/intern/bpy_rna_id_collection.c b/source/blender/python/intern/bpy_rna_id_collection.c
index 23a59c4..9b570a8 100644
--- a/source/blender/python/intern/bpy_rna_id_collection.c
+++ b/source/blender/python/intern/bpy_rna_id_collection.c
@@ -125,34 +125,34 @@ static PyObject *bpy_user_map(PyObject *UNUSED(self), PyObject *args, PyObject *
#endif
static const char *kwlist[] = {"subset", NULL};
- PyObject *iter_id = NULL;
+ PyObject *subset = NULL;
IDUserMapData data_cb = {NULL};
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O:user_map", (char **)kwlist,
- &iter_id))
+ &subset))
{
return NULL;
}
- if (iter_id) {
- PyObject *fast_it = PySequence_Fast(iter_id, "user_map");
- if (fast_it == NULL) {
+ if (subset) {
+ PyObject *subset_fast = PySequence_Fast(subset, "user_map");
+ if (subset_fast == NULL) {
return NULL;
}
- PyObject **ref_id = PySequence_Fast_ITEMS(fast_it);
- Py_ssize_t iter_id_len = PySequence_Fast_GET_SIZE(fast_it);
+ PyObject **subset_array = PySequence_Fast_ITEMS(subset_fast);
+ Py_ssize_t subset_len = PySequence_Fast_GET_SIZE(subset_fast);
data_cb.user_map = PyDict_New();
data_cb.is_subset = true;
- for (; iter_id_len; ref_id++, iter_id_len--) {
+ for (; subset_len; subset_array++, subset_len--) {
PyObject *set = PySet_New(NULL);
- PyDict_SetItem(data_cb.user_map, *ref_id, set);
+ PyDict_SetItem(data_cb.user_map, *subset_array, set);
Py_DECREF(set);
}
- Py_DECREF(fast_it);
+ Py_DECREF(subset_fast);
}
else {
data_cb.user_map = PyDict_New();
More information about the Bf-blender-cvs
mailing list