diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-03 20:05:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-03 20:05:21 +0300 |
commit | 263830f0004481cd4921f03f4242d7c80794b08d (patch) | |
tree | 30b512a06df2e619681ecacf97faee69e46913f8 /source/blender/python/intern/bpy.c | |
parent | 7c86a1a95cbc643fdbbf8c28f0422face8a15a19 (diff) |
Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
Diffstat (limited to 'source/blender/python/intern/bpy.c')
-rw-r--r-- | source/blender/python/intern/bpy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 584ba235e30..1843d0ac93a 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -85,9 +85,9 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec const char *lib; int absolute = 0; - static char *kwlist[] = {"absolute", NULL}; + static const char *kwlist[] = {"absolute", NULL}; - if (!PyArg_ParseTupleAndKeywords(args, kw, "|i:blend_paths", kwlist, &absolute)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "|i:blend_paths", (char **)kwlist, &absolute)) return NULL; for(BLI_bpathIterator_init(&bpi, NULL); !BLI_bpathIterator_isDone(&bpi); BLI_bpathIterator_step(&bpi)) { @@ -132,11 +132,11 @@ static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObj char *type; char *subdir= NULL; int folder_id; - static char *kwlist[] = {"type", "subdir", NULL}; + static const char *kwlist[] = {"type", "subdir", NULL}; char *path; - if (!PyArg_ParseTupleAndKeywords(args, kw, "s|s:user_resource", kwlist, &type, &subdir)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "s|s:user_resource", (char **)kwlist, &type, &subdir)) return NULL; /* stupid string compare */ @@ -162,9 +162,9 @@ static PyMethodDef meth_bpy_script_paths = {"script_paths", (PyCFunction)bpy_scr static PyMethodDef meth_bpy_blend_paths = {"blend_paths", (PyCFunction)bpy_blend_paths, METH_VARARGS|METH_KEYWORDS, bpy_blend_paths_doc}; static PyMethodDef meth_bpy_user_resource = {"user_resource", (PyCFunction)bpy_user_resource, METH_VARARGS|METH_KEYWORDS, bpy_user_resource_doc}; -static void bpy_import_test(char *modname) +static void bpy_import_test(const char *modname) { - PyObject *mod= PyImport_ImportModuleLevel(modname, NULL, NULL, NULL, 0); + PyObject *mod= PyImport_ImportModuleLevel((char *)modname, NULL, NULL, NULL, 0); if(mod) { Py_DECREF(mod); } |