forked from bartvdbraak/blender
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:
parent
390d27548c
commit
2008bcb0bb
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user