[Lldb-commits] [lldb] r259042 - Fix const cast error for MSVC2015 build.
Aidan Dodds via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 28 05:05:21 PST 2016
Author: aidandodds
Date: Thu Jan 28 07:05:21 2016
New Revision: 259042
URL: http://llvm.org/viewvc/llvm-project?rev=259042&view=rev
Log:
Fix const cast error for MSVC2015 build.
The Visual Studio 2015 build was failing with the following error:
error C2440: 'initializing': cannot convert from 'const char [12]' to 'char *'
This should fix the problem by initializing a non const char array, instead of taking a pointer to const static data.
Modified:
lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp?rev=259042&r1=259041&r2=259042&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp Thu Jan 28 07:05:21 2016
@@ -146,7 +146,7 @@ private:
size_t size = 0;
static wchar_t *g_python_home = Py_DecodeLocale(LLDB_PYTHON_HOME, &size);
#else
- static char *g_python_home = LLDB_PYTHON_HOME;
+ static char g_python_home[] = LLDB_PYTHON_HOME;
#endif
Py_SetPythonHome(g_python_home);
#endif
More information about the lldb-commits
mailing list