diff options
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/BPY_extern.h | 2 | ||||
-rw-r--r-- | source/blender/python/BPY_extern_run.h | 6 | ||||
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types.h | 20 | ||||
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types_customdata.h | 6 | ||||
-rw-r--r-- | source/blender/python/generic/py_capi_utils.h | 15 | ||||
-rw-r--r-- | source/blender/python/gpu/gpu_py_buffer.h | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_capi_utils.h | 6 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.h | 7 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils_Euler.h | 6 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils_Matrix.h | 16 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils_Vector.h | 6 |
11 files changed, 44 insertions, 50 deletions
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index e233a078ea9..b6604846bb8 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -81,7 +81,7 @@ void BPY_text_free_code(struct Text *text); void BPY_modules_update(void); void BPY_modules_load_user(struct bContext *C); -void BPY_app_handlers_reset(const short do_all); +void BPY_app_handlers_reset(short do_all); /** * Update function, it gets rid of py-drivers global dictionary, forcing diff --git a/source/blender/python/BPY_extern_run.h b/source/blender/python/BPY_extern_run.h index 30740d7fb60..9088a4b89c0 100644 --- a/source/blender/python/BPY_extern_run.h +++ b/source/blender/python/BPY_extern_run.h @@ -88,10 +88,8 @@ bool BPY_run_filepath(struct bContext *C, const char *filepath, struct ReportLis * This is done so error messages give useful output however there are rare cases causes problems * with introspection tools which attempt to load `__file__`. */ -bool BPY_run_text(struct bContext *C, - struct Text *text, - struct ReportList *reports, - const bool do_jump) ATTR_NONNULL(1, 2); +bool BPY_run_text(struct bContext *C, struct Text *text, struct ReportList *reports, bool do_jump) + ATTR_NONNULL(1, 2); /** \} */ diff --git a/source/blender/python/bmesh/bmesh_py_types.h b/source/blender/python/bmesh/bmesh_py_types.h index 42d1fee31c3..3786a0552d2 100644 --- a/source/blender/python/bmesh/bmesh_py_types.h +++ b/source/blender/python/bmesh/bmesh_py_types.h @@ -141,7 +141,7 @@ PyObject *BPy_BMVert_CreatePyObject(BMesh *bm, BMVert *v); PyObject *BPy_BMEdge_CreatePyObject(BMesh *bm, BMEdge *e); PyObject *BPy_BMFace_CreatePyObject(BMesh *bm, BMFace *f); PyObject *BPy_BMLoop_CreatePyObject(BMesh *bm, BMLoop *l); -PyObject *BPy_BMElemSeq_CreatePyObject(BMesh *bm, BPy_BMElem *py_ele, const char itype); +PyObject *BPy_BMElemSeq_CreatePyObject(BMesh *bm, BPy_BMElem *py_ele, char itype); PyObject *BPy_BMVertSeq_CreatePyObject(BMesh *bm); PyObject *BPy_BMEdgeSeq_CreatePyObject(BMesh *bm); PyObject *BPy_BMFaceSeq_CreatePyObject(BMesh *bm); @@ -162,18 +162,18 @@ void *BPy_BMElem_PySeq_As_Array_FAST(BMesh **r_bm, Py_ssize_t min, Py_ssize_t max, Py_ssize_t *r_size, - const char htype, - const bool do_unique_check, - const bool do_bm_check, + char htype, + bool do_unique_check, + bool do_bm_check, const char *error_prefix); void *BPy_BMElem_PySeq_As_Array(BMesh **r_bm, PyObject *seq, Py_ssize_t min, Py_ssize_t max, Py_ssize_t *r_size, - const char htype, - const bool do_unique_check, - const bool do_bm_check, + char htype, + bool do_unique_check, + bool do_bm_check, const char *error_prefix); PyObject *BPy_BMElem_Array_As_Tuple(BMesh *bm, BMHeader **elem, Py_ssize_t elem_len); @@ -182,14 +182,14 @@ PyObject *BPy_BMEdge_Array_As_Tuple(BMesh *bm, BMEdge **elem, Py_ssize_t elem_le PyObject *BPy_BMFace_Array_As_Tuple(BMesh *bm, BMFace **elem, Py_ssize_t elem_len); PyObject *BPy_BMLoop_Array_As_Tuple(BMesh *bm, BMLoop **elem, Py_ssize_t elem_len); -int BPy_BMElem_CheckHType(PyTypeObject *type, const char htype); +int BPy_BMElem_CheckHType(PyTypeObject *type, char htype); /** * Use for error strings only, not thread safe, * * \return a string like '(BMVert/BMEdge/BMFace/BMLoop)' */ -char *BPy_BMElem_StringFromHType_ex(const char htype, char ret[32]); -char *BPy_BMElem_StringFromHType(const char htype); +char *BPy_BMElem_StringFromHType_ex(char htype, char ret[32]); +char *BPy_BMElem_StringFromHType(char htype); // void bpy_bm_generic_invalidate(BPy_BMGeneric *self); int bpy_bm_generic_valid_check(BPy_BMGeneric *self); diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.h b/source/blender/python/bmesh/bmesh_py_types_customdata.h index a5555a14ad7..d81e149cac1 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.h +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.h @@ -61,9 +61,9 @@ typedef struct BPy_BMLayerItem { int index; /* index of this layer type */ } BPy_BMLayerItem; -PyObject *BPy_BMLayerAccess_CreatePyObject(BMesh *bm, const char htype); -PyObject *BPy_BMLayerCollection_CreatePyObject(BMesh *bm, const char htype, int type); -PyObject *BPy_BMLayerItem_CreatePyObject(BMesh *bm, const char htype, int type, int index); +PyObject *BPy_BMLayerAccess_CreatePyObject(BMesh *bm, char htype); +PyObject *BPy_BMLayerCollection_CreatePyObject(BMesh *bm, char htype, int type); +PyObject *BPy_BMLayerItem_CreatePyObject(BMesh *bm, char htype, int type, int index); void BPy_BM_init_types_customdata(void); diff --git a/source/blender/python/generic/py_capi_utils.h b/source/blender/python/generic/py_capi_utils.h index f6d8d7298af..604792389fa 100644 --- a/source/blender/python/generic/py_capi_utils.h +++ b/source/blender/python/generic/py_capi_utils.h @@ -73,7 +73,7 @@ int PyC_AsArray_Multi_FAST(void *array, const size_t array_item_size, PyObject *value_fast, const int *dims, - const int dims_len, + int dims_len, const PyTypeObject *type, const char *error_prefix); @@ -81,7 +81,7 @@ int PyC_AsArray_Multi(void *array, const size_t array_item_size, PyObject *value, const int *dims, - const int dims_len, + int dims_len, const PyTypeObject *type, const char *error_prefix); @@ -102,10 +102,10 @@ PyObject *PyC_Tuple_PackArray_Bool(const bool *array, uint len); #define PyC_Tuple_Pack_Bool(...) \ PyC_Tuple_PackArray_Bool(((const bool[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) -PyObject *PyC_Tuple_PackArray_Multi_F32(const float *array, const int dims[], const int dims_len); -PyObject *PyC_Tuple_PackArray_Multi_F64(const double *array, const int dims[], const int dims_len); -PyObject *PyC_Tuple_PackArray_Multi_I32(const int *array, const int dims[], const int dims_len); -PyObject *PyC_Tuple_PackArray_Multi_Bool(const bool *array, const int dims[], const int dims_len); +PyObject *PyC_Tuple_PackArray_Multi_F32(const float *array, const int dims[], int dims_len); +PyObject *PyC_Tuple_PackArray_Multi_F64(const double *array, const int dims[], int dims_len); +PyObject *PyC_Tuple_PackArray_Multi_I32(const int *array, const int dims[], int dims_len); +PyObject *PyC_Tuple_PackArray_Multi_Bool(const bool *array, const int dims[], int dims_len); /** * Caller needs to ensure tuple is uninitialized. @@ -219,8 +219,7 @@ struct PyC_StringEnum { * Use with PyArg_ParseTuple's "O&" formatting. */ int PyC_ParseStringEnum(PyObject *o, void *p); -const char *PyC_StringEnum_FindIDFromValue(const struct PyC_StringEnumItems *items, - const int value); +const char *PyC_StringEnum_FindIDFromValue(const struct PyC_StringEnumItems *items, int value); int PyC_CheckArgs_DeepCopy(PyObject *args); diff --git a/source/blender/python/gpu/gpu_py_buffer.h b/source/blender/python/gpu/gpu_py_buffer.h index cbc46339628..3dcf335230d 100644 --- a/source/blender/python/gpu/gpu_py_buffer.h +++ b/source/blender/python/gpu/gpu_py_buffer.h @@ -55,7 +55,7 @@ size_t bpygpu_Buffer_size(BPyGPUBuffer *buffer); * \param buffer: When not NULL holds a contiguous buffer * with the correct format from which the buffer will be initialized */ -BPyGPUBuffer *BPyGPU_Buffer_CreatePyObject(const int format, +BPyGPUBuffer *BPyGPU_Buffer_CreatePyObject(int format, const Py_ssize_t *shape, - const int shape_len, + int shape_len, void *buffer); diff --git a/source/blender/python/intern/bpy_capi_utils.h b/source/blender/python/intern/bpy_capi_utils.h index 0e4a28fb657..0889dec36c8 100644 --- a/source/blender/python/intern/bpy_capi_utils.h +++ b/source/blender/python/intern/bpy_capi_utils.h @@ -32,15 +32,15 @@ struct EnumPropertyItem; struct ReportList; /* error reporting */ -short BPy_reports_to_error(struct ReportList *reports, PyObject *exception, const bool clear); +short BPy_reports_to_error(struct ReportList *reports, PyObject *exception, bool clear); /** * A version of #BKE_report_write_file_fp that uses Python's stdout. */ void BPy_reports_write_stdout(const struct ReportList *reports, const char *header); bool BPy_errors_to_report_ex(struct ReportList *reports, const char *error_prefix, - const bool use_full, - const bool use_location); + bool use_full, + bool use_location); bool BPy_errors_to_report_brief_with_prefix(struct ReportList *reports, const char *error_prefix); bool BPy_errors_to_report(struct ReportList *reports); diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h index f6a05a86311..b131aed6d23 100644 --- a/source/blender/python/intern/bpy_rna.h +++ b/source/blender/python/intern/bpy_rna.h @@ -178,7 +178,7 @@ typedef struct { } BPy_FunctionRNA; StructRNA *srna_from_self(PyObject *self, const char *error_prefix); -StructRNA *pyrna_struct_as_srna(PyObject *self, const bool parent, const char *error_prefix); +StructRNA *pyrna_struct_as_srna(PyObject *self, bool parent, const char *error_prefix); void BPY_rna_init(void); void BPY_rna_exit(void); @@ -196,10 +196,7 @@ bool pyrna_id_FromPyObject(PyObject *obj, struct ID **id); bool pyrna_id_CheckPyObject(PyObject *obj); /* operators also need this to set args */ -int pyrna_pydict_to_props(PointerRNA *ptr, - PyObject *kw, - const bool all_args, - const char *error_prefix); +int pyrna_pydict_to_props(PointerRNA *ptr, PyObject *kw, bool all_args, const char *error_prefix); PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop); int pyrna_deferred_register_class(struct StructRNA *srna, PyTypeObject *py_class); diff --git a/source/blender/python/mathutils/mathutils_Euler.h b/source/blender/python/mathutils/mathutils_Euler.h index 0deef3cfdf3..453a3b3736e 100644 --- a/source/blender/python/mathutils/mathutils_Euler.h +++ b/source/blender/python/mathutils/mathutils_Euler.h @@ -37,14 +37,14 @@ typedef struct { /* prototypes */ PyObject *Euler_CreatePyObject(const float eul[3], - const short order, + short order, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT; PyObject *Euler_CreatePyObject_wrap(float eul[3], - const short order, + short order, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, - const short order, + short order, unsigned char cb_type, unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT; diff --git a/source/blender/python/mathutils/mathutils_Matrix.h b/source/blender/python/mathutils/mathutils_Matrix.h index 56bb4d39d01..3067c5417b9 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.h +++ b/source/blender/python/mathutils/mathutils_Matrix.h @@ -61,17 +61,17 @@ typedef struct { /* prototypes */ PyObject *Matrix_CreatePyObject(const float *mat, - const ushort num_col, - const ushort num_row, + ushort num_col, + ushort num_row, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT; PyObject *Matrix_CreatePyObject_wrap(float *mat, - const ushort num_col, - const ushort num_row, + ushort num_col, + ushort num_row, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); PyObject *Matrix_CreatePyObject_cb(PyObject *user, - const unsigned short num_col, - const unsigned short num_row, + unsigned short num_col, + unsigned short num_row, unsigned char cb_type, unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT; @@ -79,8 +79,8 @@ PyObject *Matrix_CreatePyObject_cb(PyObject *user, * \param mat: Initialized matrix value to use in-place, allocated with #PyMem_Malloc */ PyObject *Matrix_CreatePyObject_alloc(float *mat, - const ushort num_col, - const ushort num_row, + ushort num_col, + ushort num_row, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT; /* PyArg_ParseTuple's "O&" formatting helpers. */ diff --git a/source/blender/python/mathutils/mathutils_Vector.h b/source/blender/python/mathutils/mathutils_Vector.h index fb420b32df4..50609e51b0a 100644 --- a/source/blender/python/mathutils/mathutils_Vector.h +++ b/source/blender/python/mathutils/mathutils_Vector.h @@ -33,7 +33,7 @@ typedef struct { /*prototypes*/ PyObject *Vector_CreatePyObject(const float *vec, - const int size, + int size, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT; /** * Create a vector that wraps existing memory. @@ -41,7 +41,7 @@ PyObject *Vector_CreatePyObject(const float *vec, * \param vec: Use this vector in-place. */ PyObject *Vector_CreatePyObject_wrap(float *vec, - const int size, + int size, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); /** @@ -56,6 +56,6 @@ PyObject *Vector_CreatePyObject_cb(PyObject *user, * \param vec: Initialized vector value to use in-place, allocated with #PyMem_Malloc */ PyObject *Vector_CreatePyObject_alloc(float *vec, - const int size, + int size, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); |