diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-07 09:26:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-07 09:26:12 +0400 |
commit | 1bf5832dfba17426e22fe6a2e7d9e4bf622b393f (patch) | |
tree | 0b263a7507e07243f977a1ed126facc4af8af59c /source/blender/python/generic | |
parent | 2f23267797700ec001a7a447ee4b7d4344a2419a (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.c | 6 | ||||
-rw-r--r-- | source/blender/python/generic/py_capi_utils.h | 6 |
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); |