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_operator.c')
-rw-r--r--source/blender/python/intern/bpy_operator.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c
index fc17173a5d4..7cccc204088 100644
--- a/source/blender/python/intern/bpy_operator.c
+++ b/source/blender/python/intern/bpy_operator.c
@@ -45,6 +45,7 @@
#include "bpy_rna.h" /* for setting arg props only - pyrna_py_to_prop() */
#include "bpy_util.h"
#include "../generic/bpy_internal_import.h"
+#include "../generic/py_capi_utils.h"
#include "../generic/python_utildefines.h"
#include "RNA_access.h"
@@ -311,8 +312,8 @@ static PyObject *pyop_as_string(PyObject *UNUSED(self), PyObject *args)
const char *opname;
PyObject *kw = NULL; /* optional args */
- int all_args = 1;
- int macro_args = 1;
+ bool all_args = true;
+ bool macro_args = true;
int error_val = 0;
char *buf = NULL;
@@ -325,8 +326,14 @@ static PyObject *pyop_as_string(PyObject *UNUSED(self), PyObject *args)
return NULL;
}
- if (!PyArg_ParseTuple(args, "s|O!ii:_bpy.ops.as_string", &opname, &PyDict_Type, &kw, &all_args, &macro_args))
+ if (!PyArg_ParseTuple(
+ args, "s|O!O&O&:_bpy.ops.as_string",
+ &opname, &PyDict_Type, &kw,
+ PyC_ParseBool, &all_args,
+ PyC_ParseBool, &macro_args))
+ {
return NULL;
+ }
ot = WM_operatortype_find(opname, true);