]> granicus.if.org Git - python/commitdiff
Initialize thread_id to 0 in unthreaded build. Fixes #770247.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 13 Jul 2003 10:41:53 +0000 (10:41 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 13 Jul 2003 10:41:53 +0000 (10:41 +0000)
Python/pystate.c

index e8cb54715612bdaffb0166d1f1cedae7646d1631..5793612b51a0596082cb702700e326bbe1da22f2 100644 (file)
@@ -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;