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:
authorCampbell Barton <ideasman42@gmail.com>2013-01-07 09:26:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-07 09:26:12 +0400
commit1bf5832dfba17426e22fe6a2e7d9e4bf622b393f (patch)
tree0b263a7507e07243f977a1ed126facc4af8af59c /source/blender/python/generic
parent2f23267797700ec001a7a447ee4b7d4344a2419a (diff)
code cleanup: warnings and use stdbool for bpy* funcs.
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r--source/blender/python/generic/py_capi_utils.c6
-rw-r--r--source/blender/python/generic/py_capi_utils.h6
2 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c
index 86230318896..56d9e2ac0dd 100644
--- a/source/blender/python/generic/py_capi_utils.c
+++ b/source/blender/python/generic/py_capi_utils.c
@@ -33,6 +33,8 @@
#include <Python.h>
#include <frameobject.h>
+#include "BLI_utildefines.h" /* for bool */
+
#include "py_capi_utils.h"
/* only for BLI_strncpy_wchar_from_utf8, should replace with py funcs but too late in release now */
@@ -44,7 +46,7 @@
/* array utility function */
int PyC_AsArray(void *array, PyObject *value, const Py_ssize_t length,
- const PyTypeObject *type, const short is_double, const char *error_prefix)
+ const PyTypeObject *type, const bool is_double, const char *error_prefix)
{
PyObject *value_fast;
Py_ssize_t value_len;
@@ -114,7 +116,7 @@ int PyC_AsArray(void *array, PyObject *value, const Py_ssize_t length,
/* array utility function */
PyObject *PyC_FromArray(const void *array, int length, const PyTypeObject *type,
- const short is_double, const char *error_prefix)
+ const bool is_double, const char *error_prefix)
{
PyObject *tuple;
int i;
diff --git a/source/blender/python/generic/py_capi_utils.h b/source/blender/python/generic/py_capi_utils.h
index b4eea6ac90c..239858032de 100644
--- a/source/blender/python/generic/py_capi_utils.h
+++ b/source/blender/python/generic/py_capi_utils.h
@@ -38,9 +38,9 @@ PyObject * PyC_Err_Format_Prefix(PyObject *exception_type_prefix, const char *f
void PyC_FileAndNum(const char **filename, int *lineno);
void PyC_FileAndNum_Safe(const char **filename, int *lineno); /* checks python is running */
int PyC_AsArray(void *array, PyObject *value, const Py_ssize_t length,
- const PyTypeObject *type, const short is_double, const char *error_prefix);
-PyObject * PyC_FromArray(const void *array, int length, const PyTypeObject *type,
- const short is_double, const char *error_prefix);
+ const PyTypeObject *type, const bool is_double, const char *error_prefix);
+PyObject * PyC_FromArray(const void *array, int length, const PyTypeObject *type,
+ const bool is_double, const char *error_prefix);
/* follow http://www.python.org/dev/peps/pep-0383/ */
PyObject * PyC_UnicodeFromByte(const char *str);