Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/python/intern/bpy_library.c')
-rw-r--r--source/blender/python/intern/bpy_library.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_library.c b/source/blender/python/intern/bpy_library.c
index 3b95b99a0a1..a5879f11e51 100644
--- a/source/blender/python/intern/bpy_library.c
+++ b/source/blender/python/intern/bpy_library.c
@@ -53,6 +53,7 @@
#include "bpy_util.h"
#include "bpy_library.h"
+#include "../generic/py_capi_utils.h"
#include "../generic/python_utildefines.h"
/* nifty feature. swap out strings for RNA data */
@@ -189,10 +190,17 @@ static PyObject *bpy_lib_load(PyObject *UNUSED(self), PyObject *args, PyObject *
static const char *kwlist[] = {"filepath", "link", "relative", NULL};
BPy_Library *ret;
const char *filename = NULL;
- int is_rel = 0, is_link = 0;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|ii:load", (char **)kwlist, &filename, &is_link, &is_rel))
+ bool is_rel = false, is_link = false;
+
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kwds,
+ "s|O&O&:load", (char **)kwlist,
+ &filename,
+ PyC_ParseBool, &is_link,
+ PyC_ParseBool, &is_rel))
+ {
return NULL;
+ }
ret = PyObject_New(BPy_Library, &bpy_lib_Type);