Cleanup: remove redundant double parenthesis

This commit is contained in:
2022-09-25 15:14:13 +10:00
parent 865894481c
commit c9e35c2ced
125 changed files with 194 additions and 196 deletions

View File

@@ -424,7 +424,7 @@ static PyObject *app_translations_contexts_make(void)
}
#define SetObjString(item) \
PyStructSequence_SET_ITEM(translations_contexts, pos++, PyUnicode_FromString((item)))
PyStructSequence_SET_ITEM(translations_contexts, pos++, PyUnicode_FromString(item))
#define SetObjNone() \
PyStructSequence_SET_ITEM(translations_contexts, pos++, Py_INCREF_RET(Py_None))

View File

@@ -225,7 +225,7 @@ static void bpy_pydriver_namespace_update_depsgraph(struct Depsgraph *depsgraph)
}
if ((g_pydriver_state_prev.depsgraph == NULL) ||
((depsgraph != g_pydriver_state_prev.depsgraph->ptr.data))) {
(depsgraph != g_pydriver_state_prev.depsgraph->ptr.data)) {
PyObject *item = bpy_pydriver_depsgraph_as_pyobject(depsgraph);
PyDict_SetItem(bpy_pydriver_Dict, bpy_intern_str_depsgraph, item);
Py_DECREF(item);

View File

@@ -394,7 +394,7 @@ static int bpy_prop_array_length_parse(PyObject *o, void *p)
if (PyLong_CheckExact(o)) {
int size;
if (((size = PyLong_AsLong(o)) == -1)) {
if ((size = PyLong_AsLong(o)) == -1) {
PyErr_Format(
PyExc_ValueError, "expected number or sequence of numbers, got %s", Py_TYPE(o)->tp_name);
return 0;
@@ -427,7 +427,7 @@ static int bpy_prop_array_length_parse(PyObject *o, void *p)
PyObject **seq_items = PySequence_Fast_ITEMS(seq_fast);
for (int i = 0; i < seq_len; i++) {
int size;
if (((size = PyLong_AsLong(seq_items[i])) == -1)) {
if ((size = PyLong_AsLong(seq_items[i])) == -1) {
Py_DECREF(seq_fast);
PyErr_Format(PyExc_ValueError,
"expected number in sequence, got %s at index %d",