Fluid: remove special treatment for running Python code on windows

We discussed this in D7690 and could not find a reason for this
code anymore. It might just be leftover from some even older code.
This commit is contained in:
Jacques Lucke 2020-05-12 12:04:46 +02:00
parent 390d27548c
commit 2008bcb0bb
1 changed files with 0 additions and 12 deletions

View File

@ -544,19 +544,7 @@ bool MANTA::runPythonString(std::vector<std::string> commands)
PyGILState_STATE gilstate = PyGILState_Ensure();
for (std::vector<std::string>::iterator it = commands.begin(); it != commands.end(); ++it) {
std::string command = *it;
#ifdef WIN32
// special treatment for windows when running python code
size_t cmdLength = command.length();
char *buffer = new char[cmdLength + 1];
memcpy(buffer, command.data(), cmdLength);
buffer[cmdLength] = '\0';
success = PyRun_SimpleString(buffer);
delete[] buffer;
#else
success = PyRun_SimpleString(command.c_str());
#endif
}
PyGILState_Release(gilstate);