summaryrefslogtreecommitdiffstats
path: root/src/pythonize.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pythonize.cpp')
-rw-r--r--src/pythonize.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pythonize.cpp b/src/pythonize.cpp
index 2315d75..2a27b63 100644
--- a/src/pythonize.cpp
+++ b/src/pythonize.cpp
@@ -115,7 +115,7 @@ bool Pythonize::appendToSysPath (const char* newPath)
{
if (newPath == NULL || strlen (newPath) == 0) return false;
- char *fmtString = "import sys\nif not '%s' in sys.path:\n\tsys.path.append ('%s')\n"; //print sys.path\n";
+ const char *fmtString = "import sys\nif not '%s' in sys.path:\n\tsys.path.append ('%s')\n"; //print sys.path\n";
int length = strlen (fmtString) + 2*strlen (newPath) + 1;
char *line = new char [length];
if (!line) return false;
@@ -123,7 +123,7 @@ bool Pythonize::appendToSysPath (const char* newPath)
int res = PyRun_SimpleString (line);
- delete line;
+ delete[] line;
return res == 0;
}