From 2008bcb0bb9ebd830031b203cb41d475f9669706 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 12 May 2020 12:04:46 +0200 Subject: [PATCH] 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. --- intern/mantaflow/intern/MANTA_main.cpp | 12 ------------ 1 file changed, 12 deletions(-) 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 commands) PyGILState_STATE gilstate = PyGILState_Ensure(); for (std::vector::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);