Cleanup: use ELEM macro

This commit is contained in:
2020-11-06 12:30:59 +11:00
parent 7cb20d841d
commit aa3a4973a3
158 changed files with 280 additions and 298 deletions

View File

@@ -118,7 +118,7 @@ static PyObject *pyop_poll(PyObject *UNUSED(self), PyObject *args)
}
}
if (context_dict == NULL || context_dict == Py_None) {
if (ELEM(context_dict, NULL, Py_None)) {
context_dict = NULL;
}
else if (!PyDict_Check(context_dict)) {
@@ -220,7 +220,7 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args)
}
}
if (context_dict == NULL || context_dict == Py_None) {
if (ELEM(context_dict, NULL, Py_None)) {
context_dict = NULL;
}
else if (!PyDict_Check(context_dict)) {