[Bf-blender-cvs] [2008bcb0bb9] blender-v2.83-release: Fluid: remove special treatment for running Python code on windows
Jacques Lucke
noreply at git.blender.org
Tue May 12 12:18:22 CEST 2020
Commit: 2008bcb0bb9ebd830031b203cb41d475f9669706
Author: Jacques Lucke
Date: Tue May 12 12:04:46 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB2008bcb0bb9ebd830031b203cb41d475f9669706
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.
===================================================================
M intern/mantaflow/intern/MANTA_main.cpp
===================================================================
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp
index d6c1d05e0da..56d4c51df86 100644
--- a/intern/mantaflow/intern/MANTA_main.cpp
+++ b/intern/mantaflow/intern/MANTA_main.cpp
@@ -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);
More information about the Bf-blender-cvs
mailing list