Cleanup: use const variables where possible in the Python API

This commit is contained in:
2020-08-20 16:10:13 +10:00
parent 8877e3aa62
commit efa7aaa97f
35 changed files with 134 additions and 132 deletions

View File

@@ -65,7 +65,7 @@ static double py_timer_execute(uintptr_t UNUSED(uuid), void *user_data)
gilstate = PyGILState_Ensure();
PyObject *py_ret = PyObject_CallObject(function, NULL);
double ret = handle_returned_value(function, py_ret);
const double ret = handle_returned_value(function, py_ret);
PyGILState_Release(gilstate);
@@ -151,7 +151,7 @@ PyDoc_STRVAR(bpy_app_timers_is_registered_doc,
" :rtype: bool\n");
static PyObject *bpy_app_timers_is_registered(PyObject *UNUSED(self), PyObject *function)
{
bool ret = BLI_timer_is_registered((intptr_t)function);
const bool ret = BLI_timer_is_registered((intptr_t)function);
return PyBool_FromLong(ret);
}