Optimize PySequence_Fast usage

Access arrays directly, avoiding type-check every time.
This commit is contained in:
2015-07-29 09:58:10 +10:00
parent 96f08bf9a8
commit 339915a962
8 changed files with 38 additions and 22 deletions

View File

@@ -742,9 +742,11 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
}
else {
int len = PySequence_Fast_GET_SIZE(seq_fast);
PyObject **seq_fast_items = PySequence_Fast_ITEMS(seq_fast);
int i;
for (i = 0; i < len; i++) {
PyObject *list_item = PySequence_Fast_GET_ITEM(seq_fast, i);
PyObject *list_item = seq_fast_items[i];
if (BPy_StructRNA_Check(list_item)) {
#if 0