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

@@ -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;

View File

@@ -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);