diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-07-13 10:41:53 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-07-13 10:41:53 +0000 |
commit | a7faed163dd5a3b68ac68305649be956ed106501 (patch) | |
tree | 97ccc9be074625770af804bd7e190d099b371b40 /Python/pystate.c | |
parent | 32ac1da8052f28ec851759e2826408428d86c353 (diff) | |
download | cpython-a7faed163dd5a3b68ac68305649be956ed106501.tar.gz |
Initialize thread_id to 0 in unthreaded build. Fixes #770247.
Diffstat (limited to 'Python/pystate.c')
-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 e8cb547156..5793612b51 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; |