From e1a54214bbed9b32e1aee0e849ae654c495afa80 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 25 Mar 2013 02:41:30 +0000 Subject: code cleanup: - remove unused defines. - quiet some shadow warnings. - bevel, ifdef out some asserts that are too common. - style --- source/blender/python/intern/bpy_app_ffmpeg.c | 2 ++ source/blender/python/intern/bpy_library.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'source/blender/python/intern') diff --git a/source/blender/python/intern/bpy_app_ffmpeg.c b/source/blender/python/intern/bpy_app_ffmpeg.c index 3bf3dec3872..61e12c1cea0 100644 --- a/source/blender/python/intern/bpy_app_ffmpeg.c +++ b/source/blender/python/intern/bpy_app_ffmpeg.c @@ -81,8 +81,10 @@ static PyObject *make_ffmpeg_info(void) #define SetIntItem(flag) \ PyStructSequence_SET_ITEM(ffmpeg_info, pos++, PyLong_FromLong(flag)) #endif +#ifndef WITH_FFMPEG #define SetStrItem(str) \ PyStructSequence_SET_ITEM(ffmpeg_info, pos++, PyUnicode_FromString(str)) +#endif #define SetObjItem(obj) \ PyStructSequence_SET_ITEM(ffmpeg_info, pos++, obj) diff --git a/source/blender/python/intern/bpy_library.c b/source/blender/python/intern/bpy_library.c index 3f66fb7b337..623d45dfd90 100644 --- a/source/blender/python/intern/bpy_library.c +++ b/source/blender/python/intern/bpy_library.c @@ -330,10 +330,10 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) mainl = BLO_library_append_begin(bmain, &(self->blo_handle), self->relpath); { - int i = 0, code; - while ((code = BKE_idcode_iter_step(&i))) { - if (BKE_idcode_is_linkable(code)) { - const char *name_plural = BKE_idcode_to_name_plural(code); + int idcode_step = 0, idcode; + while ((idcode = BKE_idcode_iter_step(&idcode_step))) { + if (BKE_idcode_is_linkable(idcode)) { + const char *name_plural = BKE_idcode_to_name_plural(idcode); PyObject *ls = PyDict_GetItemString(self->dict, name_plural); // printf("lib: %s\n", name_plural); if (ls && PyList_Check(ls)) { @@ -350,7 +350,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) // printf(" %s\n", item_str); if (item_str) { - ID *id = BLO_library_append_named_part(mainl, &(self->blo_handle), item_str, code); + ID *id = BLO_library_append_named_part(mainl, &(self->blo_handle), item_str, idcode); if (id) { #ifdef USE_RNA_DATABLOCKS PointerRNA id_ptr; -- cgit v1.2.3