diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-07-13 10:41:53 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-07-13 10:41:53 (GMT) |
commit | f9ce67d65fc86e1efee60a960e15eea27c6ab108 (patch) | |
tree | a6fafd730d048f60305de8ddaf4445018c6c7c49 | |
parent | 61bfb736b4989b7eb639c63ef0589c8e398bfc5a (diff) | |
download | cpython-f9ce67d65fc86e1efee60a960e15eea27c6ab108.zip cpython-f9ce67d65fc86e1efee60a960e15eea27c6ab108.tar.gz cpython-f9ce67d65fc86e1efee60a960e15eea27c6ab108.tar.bz2 |
Initialize thread_id to 0 in unthreaded build. Fixes #770247.
-rw-r--r-- | Python/pystate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index e8cb547..5793612 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; |