diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-17 22:30:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-17 22:30:31 +0400 |
commit | 16b82845eee4198b2d56aa5a5c373008f5070f7f (patch) | |
tree | 36ca4f5c95b92ecc1e568459c783debf2151c6a5 /source/blender/python/intern | |
parent | e2b2d083e0cd2c738962e2a4535acdfb17f37416 (diff) |
code cleanup: add 'const' to headers to quiet msvc warnings, also remove (char *) casts that aren't needed now we're on Python3.3
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_driver.c | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_interface_atexit.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index a0e7c4332e1..36fd78db1b7 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -222,7 +222,7 @@ static PyMethodDef meth_bpy_resource_path = static PyObject *bpy_import_test(const char *modname) { - PyObject *mod = PyImport_ImportModuleLevel((char *)modname, NULL, NULL, NULL, 0); + PyObject *mod = PyImport_ImportModuleLevel(modname, NULL, NULL, NULL, 0); if (mod) { Py_DECREF(mod); } diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c index c49794ad37a..72bfda89b64 100644 --- a/source/blender/python/intern/bpy_driver.c +++ b/source/blender/python/intern/bpy_driver.c @@ -75,14 +75,14 @@ int bpy_pydriver_create_dict(void) } /* add bpy to global namespace */ - mod = PyImport_ImportModuleLevel((char *)"bpy", NULL, NULL, NULL, 0); + mod = PyImport_ImportModuleLevel("bpy", NULL, NULL, NULL, 0); if (mod) { PyDict_SetItemString(bpy_pydriver_Dict, "bpy", mod); Py_DECREF(mod); } /* add noise to global namespace */ - mod = PyImport_ImportModuleLevel((char *)"mathutils", NULL, NULL, NULL, 0); + mod = PyImport_ImportModuleLevel("mathutils", NULL, NULL, NULL, 0); if (mod) { PyObject *modsub = PyDict_GetItemString(PyModule_GetDict(mod), "noise"); PyDict_SetItemString(bpy_pydriver_Dict, "noise", modsub); diff --git a/source/blender/python/intern/bpy_interface_atexit.c b/source/blender/python/intern/bpy_interface_atexit.c index d1d33a01e55..5c4f6ba327c 100644 --- a/source/blender/python/intern/bpy_interface_atexit.c +++ b/source/blender/python/intern/bpy_interface_atexit.c @@ -57,7 +57,7 @@ static void atexit_func_call(const char *func_name, PyObject *atexit_func_arg) * this is intended, but if its problematic it could be changed * - campbell */ - PyObject *atexit_mod = PyImport_ImportModuleLevel((char *)"atexit", NULL, NULL, NULL, 0); + PyObject *atexit_mod = PyImport_ImportModuleLevel("atexit", NULL, NULL, NULL, 0); PyObject *atexit_func = PyObject_GetAttrString(atexit_mod, func_name); PyObject *args = PyTuple_New(1); PyObject *ret; diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 0adb5e2e90e..8fe75032a46 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -6118,7 +6118,7 @@ static PyObject *pyrna_srna_ExternalType(StructRNA *srna) PyObject *newclass; if (bpy_types_dict == NULL) { - PyObject *bpy_types = PyImport_ImportModuleLevel((char *)"bpy_types", NULL, NULL, NULL, 0); + PyObject *bpy_types = PyImport_ImportModuleLevel("bpy_types", NULL, NULL, NULL, 0); if (bpy_types == NULL) { PyErr_Print(); |