From a92fbea3560712cb13f1f8ff390f7dffaff476b4 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 15 Dec 2012 16:58:45 -0800 Subject: [PATCH] Get rid of const char* warning in plPythonPack. --- Sources/Plasma/Apps/plPythonPack/PythonInterface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Plasma/Apps/plPythonPack/PythonInterface.cpp b/Sources/Plasma/Apps/plPythonPack/PythonInterface.cpp index 29553df0..fea64c96 100644 --- a/Sources/Plasma/Apps/plPythonPack/PythonInterface.cpp +++ b/Sources/Plasma/Apps/plPythonPack/PythonInterface.cpp @@ -55,7 +55,7 @@ void PythonInterface::initPython(std::string rootDir) { // initialize the Python stuff // let Python do some intialization... - Py_SetProgramName("plasma"); + Py_SetProgramName(const_cast("plasma")); Py_NoSiteFlag = 1; Py_IgnoreEnvironmentFlag = 1; Py_Initialize(); @@ -66,7 +66,7 @@ void PythonInterface::initPython(std::string rootDir) // plasmaMod = PyImport_ImportModule("Plasma"); // create the StringIO for the stdout and stderr file - PycStringIO = (struct PycStringIO_CAPI*)PyCObject_Import("cStringIO", "cStringIO_CAPI"); + PycStringIO = (struct PycStringIO_CAPI*)PyCObject_Import(const_cast("cStringIO"), const_cast("cStringIO_CAPI")); stdFile = (*PycStringIO->NewOutput)(20000); // if we need the builtins then find the builtin module PyObject* sysmod = PyImport_ImportModule("sys"); @@ -191,7 +191,7 @@ int PythonInterface::getOutputAndReset(char** line) int size = PyString_Size( pyStr ); // reset the file back to zero - PyObject_CallMethod(stdFile,"reset",""); + PyObject_CallMethod(stdFile, const_cast("reset"), const_cast("")); /* // check to see if the debug python module is loaded if ( dbgOut != nil )