diff options
| author | Alexander Golubev <fatzer2@gmail.com> | 2025-07-25 16:31:19 +0300 |
|---|---|---|
| committer | Alexander Golubev <fatzer2@gmail.com> | 2025-07-25 18:04:29 +0300 |
| commit | d25660c894ec70a75f4d292a1c8cdc4694818c69 (patch) | |
| tree | 7fa9689fdedd065f2cf880f48eff2c00a865e5aa | |
| parent | 9ce319e17e1c0198cf3cbe6284266c59ce7c14ee (diff) | |
| download | pytdeextensions-d25660c8.tar.gz pytdeextensions-d25660c8.zip | |
Fixup some warnings
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 9b02c472c213716e68b4ae256686c83f07fa46f7)
| -rw-r--r-- | src/pythonize.cpp | 4 |
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; } |
