Skip to content
Commit 079fe48a authored by Zachary Turner's avatar Zachary Turner
Browse files

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
parent 4bca0bb0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment