code cleanup: warnings and use stdbool for bpy* funcs.

This commit is contained in:
2013-01-07 05:26:12 +00:00
parent 2f23267797
commit 1bf5832dfb
19 changed files with 215 additions and 201 deletions

View File

@@ -35,19 +35,19 @@
#include "RNA_types.h"
#include "RNA_access.h"
#include "bpy.h"
#include "bpy_util.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BKE_bpath.h"
#include "BLI_utildefines.h"
#include "bpy.h"
#include "bpy_util.h"
#include "bpy_rna.h"
#include "bpy_app.h"
#include "bpy_props.h"
#include "bpy_library.h"
#include "bpy_operator.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BKE_bpath.h"
#include "BLI_utildefines.h"
#include "BKE_main.h"
#include "BKE_global.h" /* XXX, G.main only */
#include "BKE_blender.h"
@@ -94,7 +94,7 @@ static int bpy_blend_paths_visit_cb(void *userdata, char *UNUSED(path_dst), cons
PyObject *item = PyUnicode_DecodeFSDefault(path_src);
PyList_Append(list, item);
Py_DECREF(item);
return FALSE; /* never edits the path */
return false; /* never edits the path */
}
PyDoc_STRVAR(bpy_blend_paths_doc,
@@ -116,9 +116,9 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
int flag = 0;
PyObject *list;
int absolute = FALSE;
int packed = FALSE;
int local = FALSE;
int absolute = false;
int packed = false;
int local = false;
static const char *kwlist[] = {"absolute", "packed", "local", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kw, "|iii:blend_paths",
@@ -205,7 +205,7 @@ static PyObject *bpy_resource_path(PyObject *UNUSED(self), PyObject *args, PyObj
return NULL;
}
path = BLI_get_folder_version(folder_id, (major * 100) + minor, FALSE);
path = BLI_get_folder_version(folder_id, (major * 100) + minor, false);
return PyUnicode_DecodeFSDefault(path ? path : "");
}