+- Make _PyGILState_NoteThreadState() static, it was not used anywhere
+ outside of pystate.c and should not be necessary.
- Bug #1551432: Exceptions do not define an explicit __unicode__ method. This
allows calling unicode() on exceptions classes directly to succeed.
#if defined(Py_DEBUG) && defined(WITH_THREAD)
+ /* This can be called from PyEval_RestoreThread(). Similar
+ to it, we need to ensure errno doesn't change.
PyThreadState *check = PyGILState_GetThisThreadState();
if (check && check->interp == newts->interp && check != newts)
Py_FatalError("Invalid thread state for this thread");
it so it doesn't try to create another thread state for the thread (this is
a better fix for SF bug #1010677 than the first one attempted).
/* If autoTLSkey is 0, this must be the very first threadstate created