From: Martin v. Löwis Date: Sun, 13 Jul 2003 10:41:53 +0000 (+0000) Subject: Initialize thread_id to 0 in unthreaded build. Fixes #770247. X-Git-Tag: v2.3c1~97 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f9ce67d65fc86e1efee60a960e15eea27c6ab108;p=thirdparty%2FPython%2Fcpython.git Initialize thread_id to 0 in unthreaded build. Fixes #770247. --- diff --git a/Python/pystate.c b/Python/pystate.c index e8cb54715612..5793612b51a0 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -144,7 +144,11 @@ PyThreadState_New(PyInterpreterState *interp) tstate->tick_counter = 0; tstate->gilstate_counter = 0; tstate->async_exc = NULL; +#ifdef WITH_THREAD tstate->thread_id = PyThread_get_thread_ident(); +#else + tstate->thread_id = 0; +#endif tstate->dict = NULL;