summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-10-14 17:51:29 +0000
committerZachary Turner <zturner@google.com>2015-10-14 17:51:29 +0000
commit079fe48a1d693078c756ec114bb84e194f514390 (patch)
tree81610b026d1f636d6e7e977815bdcdadf39c54f2 /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
parent4bca0bb010ffa7a48951fca6d06a2b4a931cde8d (diff)
Fix Python initialization for Python 3.
Python 3 reverses the order in which you must call Py_InitializeEx and PyEval_InitThreads. Since that log is in itself already a little nuanced, it is refactored into a function so that the reversal is more clear. At the same time, there's a lot of logic during Python initialization to save off a bunch of state and then restore it after initialization is complete. To express this more cleanly, it is refactored to an RAII-style pattern where state is saved off on acquisition and restored on release. llvm-svn: 250306
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
0 files changed, 0 insertions, 0 deletions