diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-20 09:10:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-20 09:10:13 +0300 |
commit | efa7aaa97f5c2a6073017a15f1b1d98fdc451ba5 (patch) | |
tree | 17ba7703479ce956e813373bf7e1c3ba9f7fcb8d /source/blender/python/intern/bpy_library_load.c | |
parent | 8877e3aa62930642edef180f386c8bc960619560 (diff) |
Cleanup: use const variables where possible in the Python API
Diffstat (limited to 'source/blender/python/intern/bpy_library_load.c')
-rw-r--r-- | source/blender/python/intern/bpy_library_load.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c index bcf13b1d88f..bdad4d03ae7 100644 --- a/source/blender/python/intern/bpy_library_load.c +++ b/source/blender/python/intern/bpy_library_load.c @@ -321,7 +321,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) { Main *bmain = CTX_data_main(BPy_GetContext()); Main *mainl = NULL; - int err = 0; + const int err = 0; const bool do_append = ((self->flag & FILE_LINK) == 0); BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, true); @@ -338,7 +338,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) // printf("lib: %s\n", name_plural); if (ls && PyList_Check(ls)) { /* loop */ - Py_ssize_t size = PyList_GET_SIZE(ls); + const Py_ssize_t size = PyList_GET_SIZE(ls); Py_ssize_t i; for (i = 0; i < size; i++) { @@ -423,7 +423,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) const char *name_plural = BKE_idtype_idcode_to_name_plural(idcode); PyObject *ls = PyDict_GetItemString(self->dict, name_plural); if (ls && PyList_Check(ls)) { - Py_ssize_t size = PyList_GET_SIZE(ls); + const Py_ssize_t size = PyList_GET_SIZE(ls); Py_ssize_t i; PyObject *item; |