From aab4f2b76253936d1ba09562f1b1a21661860bf7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 1 Jan 2015 23:26:03 +1100 Subject: cleanup: redundant casts & const cast correctness --- source/blender/python/bmesh/bmesh_py_types_meshdata.c | 2 +- source/blender/python/generic/bpy_internal_import.c | 2 +- source/blender/python/generic/idprop_py_api.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/python') diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c index 3512dc76cef..4fa5d0f755c 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c @@ -369,7 +369,7 @@ PyObject *BPy_BMVertSkin_CreatePyObject(struct MVertSkin *mvertskin) static void mloopcol_to_float(const MLoopCol *mloopcol, float r_col[3]) { - rgb_uchar_to_float(r_col, (unsigned char *)&mloopcol->r); + rgb_uchar_to_float(r_col, (const unsigned char *)&mloopcol->r); } static void mloopcol_from_float(MLoopCol *mloopcol, const float col[3]) diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c index 2d19fdb87b3..b0539607bdc 100644 --- a/source/blender/python/generic/bpy_internal_import.c +++ b/source/blender/python/generic/bpy_internal_import.c @@ -265,7 +265,7 @@ PyObject *bpy_text_reimport(PyObject *module, int *found) } /* make into a module */ - return PyImport_ExecCodeModule((char *)name, text->compiled); + return PyImport_ExecCodeModule(name, text->compiled); } diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index 7fe282b2d71..be2782e90d6 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -376,7 +376,7 @@ bool BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty *group, else if (PyUnicode_Check(ob)) { #ifdef USE_STRING_COERCE PyObject *value_coerce = NULL; - val.string.str = (char *)PyC_UnicodeAsByte(ob, &value_coerce); + val.string.str = PyC_UnicodeAsByte(ob, &value_coerce); val.string.subtype = IDP_STRING_SUB_UTF8; prop = IDP_New(IDP_STRING, &val, name); Py_XDECREF(value_coerce); -- cgit v1.2.3