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

@@ -84,7 +84,7 @@ static void cb_region_draw(const bContext *C, ARegion *UNUSED(region), void *cus
static PyObject *PyC_Tuple_CopySized(PyObject *src, int len_dst)
{
PyObject *dst = PyTuple_New(len_dst);
int len_src = PyTuple_GET_SIZE(src);
const int len_src = PyTuple_GET_SIZE(src);
BLI_assert(len_src <= len_dst);
for (int i = 0; i < len_src; i++) {
PyObject *item = PyTuple_GET_ITEM(src, i);