diff options
-rw-r--r-- | intern/guardedalloc/MEM_guardedalloc.h | 2 | ||||
-rw-r--r-- | intern/guardedalloc/intern/mallocn.c | 4 | ||||
-rw-r--r-- | intern/guardedalloc/test/simpletest/memtest.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_props.c | 38 | ||||
-rw-r--r-- | source/creator/creator.c | 2 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/BlendType.h | 4 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/Exception.cpp | 8 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/Exception.h | 10 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/ImageRender.cpp | 10 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/Texture.cpp | 7 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/VideoFFmpeg.cpp | 6 |
12 files changed, 55 insertions, 46 deletions
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h index 7f1a66564a7..45c2e048df9 100644 --- a/intern/guardedalloc/MEM_guardedalloc.h +++ b/intern/guardedalloc/MEM_guardedalloc.h @@ -122,7 +122,7 @@ extern "C" { void MEM_printmemlist_stats(void); /** Set the callback function for error output. */ - void MEM_set_error_callback(void (*func)(char *)); + void MEM_set_error_callback(void (*func)(const char *)); /** * Are the start/end block markers still correct ? diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c index 677d756c8e6..806f8d183ba 100644 --- a/intern/guardedalloc/intern/mallocn.c +++ b/intern/guardedalloc/intern/mallocn.c @@ -135,7 +135,7 @@ static volatile uintptr_t mem_in_use= 0, mmap_in_use= 0; static volatile struct localListBase _membase; static volatile struct localListBase *membase = &_membase; -static void (*error_callback)(char *) = NULL; +static void (*error_callback)(const char *) = NULL; static void (*thread_lock_callback)(void) = NULL; static void (*thread_unlock_callback)(void) = NULL; @@ -197,7 +197,7 @@ int MEM_check_memory_integrity() } -void MEM_set_error_callback(void (*func)(char *)) +void MEM_set_error_callback(void (*func)(const char *)) { error_callback = func; } diff --git a/intern/guardedalloc/test/simpletest/memtest.c b/intern/guardedalloc/test/simpletest/memtest.c index ec72b0f01e5..51f1f491894 100644 --- a/intern/guardedalloc/test/simpletest/memtest.c +++ b/intern/guardedalloc/test/simpletest/memtest.c @@ -47,6 +47,12 @@ #include <config.h> #endif +static void mem_error_cb(const char *errorStr) +{ + fprintf(stderr, "%s", errorStr); + fflush(stderr); +} + int main (int argc, char *argv[]) { int verbose = 0; @@ -75,7 +81,7 @@ int main (int argc, char *argv[]) /* Round one, do a normal allocation, and free the blocks again. */ /* ----------------------------------------------------------------- */ /* flush mem lib output to stderr */ - MEM_set_error_callback(stderr); + MEM_set_error_callback(mem_error_cb); for (i = 0; i < NUM_BLOCKS; i++) { int blocksize = 10000; diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index ed57027d888..2abddb0860a 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -2590,7 +2590,7 @@ static int rna_preprocess(char *outfile) return status; } -static void mem_error_cb(char *errorStr) +static void mem_error_cb(const char *errorStr) { fprintf(stderr, "%s", errorStr); fflush(stderr); diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index b9056707f06..07f7dfc0d09 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -122,7 +122,7 @@ PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw) char *pysubtype= NULL; int subtype= PROP_NONE; - if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssiO!s:BoolProperty", kwlist, &id, &name, &description, &def, &PySet_Type, &pyopts, &pysubtype)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssiO!s:BoolProperty", (char **)kwlist, &id, &name, &description, &def, &PySet_Type, &pyopts, &pysubtype)) return NULL; if(pyopts && pyrna_set_to_enum_bitfield(property_flag_items, pyopts, &opts, "BoolProperty(options={...}):")) @@ -173,7 +173,7 @@ PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; /* self's type was compatible but error getting the srna */ } else if(srna) { - static char *kwlist[] = {"attr", "name", "description", "default", "options", "subtype", "size", NULL}; + static const char *kwlist[] = {"attr", "name", "description", "default", "options", "subtype", "size", NULL}; char *id=NULL, *name="", *description=""; int def[PYRNA_STACK_ARRAY]={0}; int size=3; @@ -184,7 +184,7 @@ PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject *kw) char *pysubtype= NULL; int subtype= PROP_NONE; - if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssOO!si:BoolVectorProperty", kwlist, &id, &name, &description, &pydef, &PySet_Type, &pyopts, &pysubtype, &size)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssOO!si:BoolVectorProperty", (char **)kwlist, &id, &name, &description, &pydef, &PySet_Type, &pyopts, &pysubtype, &size)) return NULL; if(pyopts && pyrna_set_to_enum_bitfield(property_flag_items, pyopts, &opts, "BoolVectorProperty(options={...}):")) @@ -244,7 +244,7 @@ PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; /* self's type was compatible but error getting the srna */ } else if(srna) { - static char *kwlist[] = {"attr", "name", "description", "default", "min", "max", "soft_min", "soft_max", "step", "options", "subtype", NULL}; + static const char *kwlist[] = {"attr", "name", "description", "default", "min", "max", "soft_min", "soft_max", "step", "options", "subtype", NULL}; char *id=NULL, *name="", *description=""; int min=INT_MIN, max=INT_MAX, soft_min=INT_MIN, soft_max=INT_MAX, step=1, def=0; PropertyRNA *prop; @@ -253,7 +253,7 @@ PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw) char *pysubtype= NULL; int subtype= PROP_NONE; - if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssiiiiiiO!s:IntProperty", kwlist, &id, &name, &description, &def, &min, &max, &soft_min, &soft_max, &step, &PySet_Type, &pyopts, &pysubtype)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssiiiiiiO!s:IntProperty", (char **)kwlist, &id, &name, &description, &def, &min, &max, &soft_min, &soft_max, &step, &PySet_Type, &pyopts, &pysubtype)) return NULL; if(pyopts && pyrna_set_to_enum_bitfield(property_flag_items, pyopts, &opts, "IntProperty(options={...}):")) @@ -305,7 +305,7 @@ PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; /* self's type was compatible but error getting the srna */ } else if(srna) { - static char *kwlist[] = {"attr", "name", "description", "default", "min", "max", "soft_min", "soft_max", "step", "options", "subtype", "size", NULL}; + static const char *kwlist[] = {"attr", "name", "description", "default", "min", "max", "soft_min", "soft_max", "step", "options", "subtype", "size", NULL}; char *id=NULL, *name="", *description=""; int min=INT_MIN, max=INT_MAX, soft_min=INT_MIN, soft_max=INT_MAX, step=1, def[PYRNA_STACK_ARRAY]={0}; int size=3; @@ -316,7 +316,7 @@ PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject *kw) char *pysubtype= NULL; int subtype= PROP_NONE; - if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssOiiiiO!si:IntVectorProperty", kwlist, &id, &name, &description, &pydef, &min, &max, &soft_min, &soft_max, &PySet_Type, &pyopts, &pysubtype, &size)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssOiiiiO!si:IntVectorProperty", (char **)kwlist, &id, &name, &description, &pydef, &min, &max, &soft_min, &soft_max, &PySet_Type, &pyopts, &pysubtype, &size)) return NULL; if(pyopts && pyrna_set_to_enum_bitfield(property_flag_items, pyopts, &opts, "IntVectorProperty(options={...}):")) @@ -380,7 +380,7 @@ PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; /* self's type was compatible but error getting the srna */ } else if(srna) { - static char *kwlist[] = {"attr", "name", "description", "default", "min", "max", "soft_min", "soft_max", "step", "precision", "options", "subtype", "unit", NULL}; + static const char *kwlist[] = {"attr", "name", "description", "default", "min", "max", "soft_min", "soft_max", "step", "precision", "options", "subtype", "unit", NULL}; char *id=NULL, *name="", *description=""; float min=-FLT_MAX, max=FLT_MAX, soft_min=-FLT_MAX, soft_max=FLT_MAX, step=3, def=0.0f; int precision= 2; @@ -392,7 +392,7 @@ PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw) char *pyunit= NULL; int unit= PROP_UNIT_NONE; - if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssffffffiO!ss:FloatProperty", kwlist, &id, &name, &description, &def, &min, &max, &soft_min, &soft_max, &step, &precision, &PySet_Type, &pyopts, &pysubtype, &pyunit)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssffffffiO!ss:FloatProperty", (char **)kwlist, &id, &name, &description, &def, &min, &max, &soft_min, &soft_max, &step, &precision, &PySet_Type, &pyopts, &pysubtype, &pyunit)) return NULL; if(pyopts && pyrna_set_to_enum_bitfield(property_flag_items, pyopts, &opts, "FloatProperty(options={...}):")) @@ -449,7 +449,7 @@ PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; /* self's type was compatible but error getting the srna */ } else if(srna) { - static char *kwlist[] = {"attr", "name", "description", "default", "min", "max", "soft_min", "soft_max", "step", "precision", "options", "subtype", "size", NULL}; + static const char *kwlist[] = {"attr", "name", "description", "default", "min", "max", "soft_min", "soft_max", "step", "precision", "options", "subtype", "size", NULL}; char *id=NULL, *name="", *description=""; float min=-FLT_MAX, max=FLT_MAX, soft_min=-FLT_MAX, soft_max=FLT_MAX, step=3, def[PYRNA_STACK_ARRAY]={0.0f}; int precision= 2, size=3; @@ -460,7 +460,7 @@ PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObject *kw) char *pysubtype= NULL; int subtype= PROP_NONE; - if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssOfffffiO!si:FloatVectorProperty", kwlist, &id, &name, &description, &pydef, &min, &max, &soft_min, &soft_max, &step, &precision, &PySet_Type, &pyopts, &pysubtype, &size)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssOfffffiO!si:FloatVectorProperty", (char **)kwlist, &id, &name, &description, &pydef, &min, &max, &soft_min, &soft_max, &step, &precision, &PySet_Type, &pyopts, &pysubtype, &size)) return NULL; if(pyopts && pyrna_set_to_enum_bitfield(property_flag_items, pyopts, &opts, "FloatVectorProperty(options={...}):")) @@ -521,7 +521,7 @@ PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; /* self's type was compatible but error getting the srna */ } else if(srna) { - static char *kwlist[] = {"attr", "name", "description", "default", "maxlen", "options", "subtype", NULL}; + static const char *kwlist[] = {"attr", "name", "description", "default", "maxlen", "options", "subtype", NULL}; char *id=NULL, *name="", *description="", *def=""; int maxlen=0; PropertyRNA *prop; @@ -530,7 +530,7 @@ PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw) char *pysubtype= NULL; int subtype= PROP_NONE; - if (!PyArg_ParseTupleAndKeywords(args, kw, "s|sssiO!s:StringProperty", kwlist, &id, &name, &description, &def, &maxlen, &PySet_Type, &pyopts, &pysubtype)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "s|sssiO!s:StringProperty", (char **)kwlist, &id, &name, &description, &def, &maxlen, &PySet_Type, &pyopts, &pysubtype)) return NULL; if(pyopts && pyrna_set_to_enum_bitfield(property_flag_items, pyopts, &opts, "StringProperty(options={...}):")) @@ -627,7 +627,7 @@ PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; /* self's type was compatible but error getting the srna */ } else if(srna) { - static char *kwlist[] = {"attr", "items", "name", "description", "default", "options", NULL}; + static const char *kwlist[] = {"attr", "items", "name", "description", "default", "options", NULL}; char *id=NULL, *name="", *description="", *def=""; int defvalue=0; PyObject *items= Py_None; @@ -636,7 +636,7 @@ PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw) PyObject *pyopts= NULL; int opts=0; - if (!PyArg_ParseTupleAndKeywords(args, kw, "sO|sssO!:EnumProperty", kwlist, &id, &items, &name, &description, &def, &PySet_Type, &pyopts)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "sO|sssO!:EnumProperty", (char **)kwlist, &id, &items, &name, &description, &def, &PySet_Type, &pyopts)) return NULL; if(pyopts && pyrna_set_to_enum_bitfield(property_flag_items, pyopts, &opts, "EnumProperty(options={...}):")) @@ -702,7 +702,7 @@ PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; /* self's type was compatible but error getting the srna */ } else if(srna) { - static char *kwlist[] = {"attr", "type", "name", "description", "options", NULL}; + static const char *kwlist[] = {"attr", "type", "name", "description", "options", NULL}; char *id=NULL, *name="", *description=""; PropertyRNA *prop; StructRNA *ptype; @@ -710,7 +710,7 @@ PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw) PyObject *pyopts= NULL; int opts=0; - if (!PyArg_ParseTupleAndKeywords(args, kw, "sO|ssO!:PointerProperty", kwlist, &id, &type, &name, &description, &PySet_Type, &pyopts)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "sO|ssO!:PointerProperty", (char **)kwlist, &id, &type, &name, &description, &PySet_Type, &pyopts)) return NULL; if(pyopts && pyrna_set_to_enum_bitfield(property_flag_items, pyopts, &opts, "PointerProperty(options={...}):")) @@ -757,7 +757,7 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; /* self's type was compatible but error getting the srna */ } else if(srna) { - static char *kwlist[] = {"attr", "type", "name", "description", "options", NULL}; + static const char *kwlist[] = {"attr", "type", "name", "description", "options", NULL}; char *id=NULL, *name="", *description=""; PropertyRNA *prop; StructRNA *ptype; @@ -765,7 +765,7 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw) PyObject *pyopts= NULL; int opts=0; - if (!PyArg_ParseTupleAndKeywords(args, kw, "sO|ssO!:CollectionProperty", kwlist, &id, &type, &name, &description, &PySet_Type, &pyopts)) + if (!PyArg_ParseTupleAndKeywords(args, kw, "sO|ssO!:CollectionProperty", (char **)kwlist, &id, &type, &name, &description, &PySet_Type, &pyopts)) return NULL; if(pyopts && pyrna_set_to_enum_bitfield(property_flag_items, pyopts, &opts, "CollectionProperty(options={...}):")) diff --git a/source/creator/creator.c b/source/creator/creator.c index 68d0730a6f5..bbe0b4a1378 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -1053,7 +1053,7 @@ static void error_cb(char *err) printf("%s\n", err); /* XXX do this in WM too */ } -static void mem_error_cb(char *errorStr) +static void mem_error_cb(const char *errorStr) { fputs(errorStr, stderr); fflush(stderr); diff --git a/source/gameengine/VideoTexture/BlendType.h b/source/gameengine/VideoTexture/BlendType.h index 8b243c43912..2b273253af6 100644 --- a/source/gameengine/VideoTexture/BlendType.h +++ b/source/gameengine/VideoTexture/BlendType.h @@ -30,7 +30,7 @@ template <class PyObj> class BlendType { public: /// constructor - BlendType (char * name) : m_name(name) {} + BlendType (const char * name) : m_name(name) {} /// check blender type and return pointer to contained object or NULL (if type is not valid) PyObj * checkType (PyObject * obj) @@ -68,7 +68,7 @@ public: protected: /// name of Python type - char * m_name; + const char * m_name; /// pointer to Python type PyTypeObject * m_objType; }; diff --git a/source/gameengine/VideoTexture/Exception.cpp b/source/gameengine/VideoTexture/Exception.cpp index 35d335b5981..8b4808ffbe9 100644 --- a/source/gameengine/VideoTexture/Exception.cpp +++ b/source/gameengine/VideoTexture/Exception.cpp @@ -41,7 +41,7 @@ ExpDesc errNFoundDesc (ErrNotFound, "Error description not found"); // implementation of ExpDesc // constructor -ExpDesc::ExpDesc (ExceptionID & exp, char * desc, RESULT hres) +ExpDesc::ExpDesc (ExceptionID & exp, const char * desc, RESULT hres) : m_expID(exp), m_hRslt(hres), m_description(desc) { } @@ -60,7 +60,7 @@ std::vector<ExpDesc*> ExpDesc::m_expDescs; std::string Exception::m_lastError; // log file name -char * Exception::m_logFile = NULL; +const char * Exception::m_logFile = NULL; // basic constructor @@ -98,7 +98,7 @@ const char * Exception::what() // debug version - with file and line of exception -Exception::Exception (ExceptionID & expID, RESULT rslt, char * fil, int lin) +Exception::Exception (ExceptionID & expID, RESULT rslt, const char * fil, int lin) : m_expID (&expID), m_hRslt (rslt) { // set file and line @@ -108,7 +108,7 @@ Exception::Exception (ExceptionID & expID, RESULT rslt, char * fil, int lin) // set file and line -void Exception::setFileLine (char * fil, int lin) +void Exception::setFileLine (const char * fil, int lin) { if (fil != NULL) m_fileName = fil; m_line = lin; diff --git a/source/gameengine/VideoTexture/Exception.h b/source/gameengine/VideoTexture/Exception.h index 1a3c25071b1..4a57a7f20e4 100644 --- a/source/gameengine/VideoTexture/Exception.h +++ b/source/gameengine/VideoTexture/Exception.h @@ -91,7 +91,7 @@ class ExpDesc { public: // constructor a destructor - ExpDesc (ExceptionID & exp, char * desc, RESULT hres = S_OK); + ExpDesc (ExceptionID & exp, const char * desc, RESULT hres = S_OK); ~ExpDesc (void); // comparision function @@ -132,7 +132,7 @@ private: // result RESULT m_hRslt; // description - char * m_description; + const char * m_description; // not allowed ExpDesc (const ExpDesc & obj) : m_expID (ErrNotFound) {} @@ -157,9 +157,9 @@ public: virtual const char * what(void); // debug version of constructor - Exception (ExceptionID & expID, RESULT rslt, char * fil, int lin); + Exception (ExceptionID & expID, RESULT rslt, const char * fil, int lin); // set source file and line of exception - void setFileLine (char * fil, int lin); + void setFileLine (const char * fil, int lin); // get description in string std::string & getDesc (void) throw() { return m_desc; } @@ -174,7 +174,7 @@ public: static std::string m_lastError; /// log file name - static char * m_logFile; + static const char * m_logFile; protected: // exception identification diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp index 8fd0a8968f8..0a01ce11a0e 100644 --- a/source/gameengine/VideoTexture/ImageRender.cpp +++ b/source/gameengine/VideoTexture/ImageRender.cpp @@ -282,9 +282,10 @@ static int ImageRender_init (PyObject * pySelf, PyObject * args, PyObject * kwds // camera object PyObject * camera; // parameter keywords - static char *kwlist[] = {"sceneObj", "cameraObj", NULL}; + static const char *kwlist[] = {"sceneObj", "cameraObj", NULL}; // get parameters - if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &scene, &camera)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", + const_cast<char**>(kwlist), &scene, &camera)) return -1; try { @@ -428,9 +429,10 @@ static int ImageMirror_init (PyObject * pySelf, PyObject * args, PyObject * kwds // material of the mirror short materialID = 0; // parameter keywords - static char *kwlist[] = {"scene", "observer", "mirror", "material", NULL}; + static const char *kwlist[] = {"scene", "observer", "mirror", "material", NULL}; // get parameters - if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOO|h", kwlist, &scene, &observer, &mirror, &materialID)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOO|h", + const_cast<char**>(kwlist), &scene, &observer, &mirror, &materialID)) return -1; try { diff --git a/source/gameengine/VideoTexture/Texture.cpp b/source/gameengine/VideoTexture/Texture.cpp index 09c95b929c5..f59b92409f5 100644 --- a/source/gameengine/VideoTexture/Texture.cpp +++ b/source/gameengine/VideoTexture/Texture.cpp @@ -186,11 +186,12 @@ int Texture_init (Texture *self, PyObject *args, PyObject *kwds) // texture object with shared texture ID Texture * texObj = NULL; - static char *kwlist[] = {"gameObj", "materialID", "textureID", "textureObj", NULL}; + static const char *kwlist[] = {"gameObj", "materialID", "textureID", "textureObj", NULL}; // get parameters - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|hhO!", kwlist, &obj, &matID, - &texID, &TextureType, &texObj)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|hhO!", + const_cast<char**>(kwlist), &obj, &matID, &texID, &TextureType, + &texObj)) return -1; // if parameters are available diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp index 9136e619288..4c87b1764d6 100644 --- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp +++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp @@ -1074,11 +1074,11 @@ static int VideoFFmpeg_init (PyObject * pySelf, PyObject * args, PyObject * kwds // capture rate, only if capt is >= 0 float rate = 25.f; - static char *kwlist[] = {"file", "capture", "rate", "width", "height", NULL}; + static const char *kwlist[] = {"file", "capture", "rate", "width", "height", NULL}; // get parameters - if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|hfhh", kwlist, &file, &capt, - &rate, &width, &height)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|hfhh", + const_cast<char**>(kwlist), &file, &capt, &rate, &width, &height)) return -1; try |