diff options
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r-- | source/blender/python/generic/idprop_py_api.c | 2 | ||||
-rw-r--r-- | source/blender/python/generic/py_capi_utils.c | 5 | ||||
-rw-r--r-- | source/blender/python/generic/py_capi_utils.h | 34 |
3 files changed, 20 insertions, 21 deletions
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index 8bed0f28cba..918ec8fa018 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -944,7 +944,7 @@ PyObject *BPy_Wrap_GetKeys(IDProperty *prop) /* pass */ } - if (i != prop->len) { /* if the loop didnt finish, we know the length is wrong */ + if (i != prop->len) { /* if the loop didn't finish, we know the length is wrong */ BPy_IDGroup_CorrectListLen(prop, list, i, __func__); Py_DECREF(list); /*free the list*/ /*call self again*/ diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 46f80bf79f9..62b24618d3f 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -46,7 +46,6 @@ #endif #ifdef _WIN32 -#include "BLI_path_util.h" /* BLI_setenv() */ #include "BLI_math_base.h" /* isfinite() */ #endif @@ -618,7 +617,7 @@ const char *PyC_UnicodeAsByteAndSize(PyObject *py_str, Py_ssize_t *size, PyObjec if (result) { /* 99% of the time this is enough but we better support non unicode - * chars since blender doesnt limit this */ + * chars since blender doesn't limit this */ return result; } else { @@ -671,7 +670,7 @@ PyObject *PyC_UnicodeFromByteAndSize(const char *str, Py_ssize_t size) PyObject *result = PyUnicode_FromStringAndSize(str, size); if (result) { /* 99% of the time this is enough but we better support non unicode - * chars since blender doesnt limit this */ + * chars since blender doesn't limit this */ return result; } else { diff --git a/source/blender/python/generic/py_capi_utils.h b/source/blender/python/generic/py_capi_utils.h index 92964fce9d5..4cf6d6b26de 100644 --- a/source/blender/python/generic/py_capi_utils.h +++ b/source/blender/python/generic/py_capi_utils.h @@ -30,19 +30,19 @@ #include "BLI_sys_types.h" #include "BLI_utildefines_variadic.h" -void PyC_ObSpit(const char *name, PyObject *var); -void PyC_ObSpitStr(char *result, size_t result_len, PyObject *var); -void PyC_LineSpit(void); -void PyC_StackSpit(void); -PyObject * PyC_ExceptionBuffer(void); -PyObject * PyC_ExceptionBuffer_Simple(void); -PyObject * PyC_Object_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...); -PyObject * PyC_FrozenSetFromStrings(const char **strings); -PyObject * PyC_Err_Format_Prefix(PyObject *exception_type_prefix, const char *format, ...); -void PyC_Err_PrintWithFunc(PyObject *py_func); - -void PyC_FileAndNum(const char **filename, int *lineno); -void PyC_FileAndNum_Safe(const char **filename, int *lineno); /* checks python is running */ +void PyC_ObSpit(const char *name, PyObject *var); +void PyC_ObSpitStr(char *result, size_t result_len, PyObject *var); +void PyC_LineSpit(void); +void PyC_StackSpit(void); +PyObject *PyC_ExceptionBuffer(void); +PyObject *PyC_ExceptionBuffer_Simple(void); +PyObject *PyC_Object_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...); +PyObject *PyC_FrozenSetFromStrings(const char **strings); +PyObject *PyC_Err_Format_Prefix(PyObject *exception_type_prefix, const char *format, ...); +void PyC_Err_PrintWithFunc(PyObject *py_func); + +void PyC_FileAndNum(const char **filename, int *lineno); +void PyC_FileAndNum_Safe(const char **filename, int *lineno); /* checks python is running */ int PyC_AsArray_FAST( void *array, PyObject *value_fast, const Py_ssize_t length, const PyTypeObject *type, const bool is_double, const char *error_prefix); @@ -71,10 +71,10 @@ void PyC_Tuple_Fill(PyObject *tuple, PyObject *value); void PyC_List_Fill(PyObject *list, PyObject *value); /* follow http://www.python.org/dev/peps/pep-0383/ */ -PyObject * PyC_UnicodeFromByte(const char *str); -PyObject * PyC_UnicodeFromByteAndSize(const char *str, Py_ssize_t size); -const char * PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce); /* coerce must be NULL */ -const char * PyC_UnicodeAsByteAndSize(PyObject *py_str, Py_ssize_t *size, PyObject **coerce); +PyObject *PyC_UnicodeFromByte(const char *str); +PyObject *PyC_UnicodeFromByteAndSize(const char *str, Py_ssize_t size); +const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce); /* coerce must be NULL */ +const char *PyC_UnicodeAsByteAndSize(PyObject *py_str, Py_ssize_t *size, PyObject **coerce); /* name namespace function for bpy & bge */ PyObject *PyC_DefaultNameSpace(const char *filename); |