Cleanup: use STR_ELEM macro
This commit is contained in:
@@ -4136,7 +4136,7 @@ static PyObject *pyrna_struct_getattro(BPy_StructRNA *self, PyObject *pyname)
|
||||
}
|
||||
else if (name[0] == '_') { /* rna can't start with a "_", so for __dict__ and similar we can skip using rna lookups */
|
||||
/* annoying exception, maybe we need to have different types for this... */
|
||||
if ((STREQ(name, "__getitem__") || STREQ(name, "__setitem__")) && !RNA_struct_idprops_check(self->ptr.type)) {
|
||||
if (STR_ELEM(name, "__getitem__", "__setitem__") && !RNA_struct_idprops_check(self->ptr.type)) {
|
||||
PyErr_SetString(PyExc_AttributeError, "bpy_struct: no __getitem__ support for this type");
|
||||
ret = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user