From 2a6df7dfe5ae9c25780166771c56ff921cc90f63 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 20 Feb 2020 15:38:58 +1100 Subject: Cleanup: use named unsigned types in the Python API --- source/blender/python/bmesh/bmesh_py_ops.c | 4 ++-- source/blender/python/bmesh/bmesh_py_ops_call.c | 2 +- source/blender/python/bmesh/bmesh_py_types.c | 10 +++++----- source/blender/python/bmesh/bmesh_py_types.h | 2 +- source/blender/python/bmesh/bmesh_py_types_meshdata.c | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'source/blender/python/bmesh') diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c index a3bfe791c88..4708736ca27 100644 --- a/source/blender/python/bmesh/bmesh_py_ops.c +++ b/source/blender/python/bmesh/bmesh_py_ops.c @@ -259,8 +259,8 @@ static PyObject *bpy_bmesh_ops_fakemod_getattro(PyObject *UNUSED(self), PyObject static PyObject *bpy_bmesh_ops_fakemod_dir(PyObject *UNUSED(self)) { - const unsigned int tot = bmo_opdefines_total; - unsigned int i; + const uint tot = bmo_opdefines_total; + uint i; PyObject *ret; ret = PyList_New(bmo_opdefines_total); diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.c b/source/blender/python/bmesh/bmesh_py_ops_call.c index f9196f7f100..f44fa2aeac3 100644 --- a/source/blender/python/bmesh/bmesh_py_ops_call.c +++ b/source/blender/python/bmesh/bmesh_py_ops_call.c @@ -337,7 +337,7 @@ static int bpy_slot_from_py(BMesh *bm, BMIter iter; BMHeader *ele; int tot; - unsigned int i; + uint i; if (bpy_slot_from_py_elemseq_check( (BPy_BMGeneric *)value, diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index ebfce204456..12ae18a5bf5 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -2680,12 +2680,12 @@ static PyObject *bpy_bmelemseq_sort(BPy_BMElemSeq *self, PyObject *args, PyObjec double *keys; int *elem_idx; - unsigned int *elem_map_idx; + uint *elem_map_idx; int (*elem_idx_compare_by_keys)(const void *, const void *, void *); - unsigned int *vert_idx = NULL; - unsigned int *edge_idx = NULL; - unsigned int *face_idx = NULL; + uint *vert_idx = NULL; + uint *edge_idx = NULL; + uint *face_idx = NULL; int i; BMesh *bm = self->bm; @@ -4065,7 +4065,7 @@ int bpy_bm_generic_valid_check(BPy_BMGeneric *self) int bpy_bm_generic_valid_check_source(BMesh *bm_source, const char *error_prefix, void **args, - unsigned int args_tot) + uint args_tot) { int ret = 0; diff --git a/source/blender/python/bmesh/bmesh_py_types.h b/source/blender/python/bmesh/bmesh_py_types.h index c61fdeab4b0..74bfbcec3c7 100644 --- a/source/blender/python/bmesh/bmesh_py_types.h +++ b/source/blender/python/bmesh/bmesh_py_types.h @@ -177,7 +177,7 @@ int bpy_bm_generic_valid_check(BPy_BMGeneric *self); int bpy_bm_generic_valid_check_source(BMesh *bm_source, const char *error_prefix, void **args, - unsigned int args_n) ATTR_NONNULL(1, 2); + uint args_n) ATTR_NONNULL(1, 2); #define BPY_BM_CHECK_OBJ(obj) \ if (UNLIKELY(bpy_bm_generic_valid_check((BPy_BMGeneric *)obj) == -1)) { \ diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c index 08d934251af..7cecc844f9a 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c @@ -284,15 +284,15 @@ PyObject *BPy_BMVertSkin_CreatePyObject(struct MVertSkin *mvertskin) static void mloopcol_to_float(const MLoopCol *mloopcol, float r_col[3]) { - rgba_uchar_to_float(r_col, (const unsigned char *)&mloopcol->r); + rgba_uchar_to_float(r_col, (const uchar *)&mloopcol->r); } static void mloopcol_from_float(MLoopCol *mloopcol, const float col[3]) { - rgba_float_to_uchar((unsigned char *)&mloopcol->r, col); + rgba_float_to_uchar((uchar *)&mloopcol->r, col); } -static unsigned char mathutils_bmloopcol_cb_index = -1; +static uchar mathutils_bmloopcol_cb_index = -1; static int mathutils_bmloopcol_check(BaseMathObject *UNUSED(bmo)) { -- cgit v1.2.3