commit | 04d17d30b4cd8bc751055dade76179597513099d | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Mon Mar 31 22:04:38 2014 +0200 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Mon Mar 31 22:04:38 2014 +0200 |
tree | 33a30fb781387f0e30be4196ebb4cf6966b74f01 | |
parent | 809ee902c438c2b4666e990ebe1cfd9c75a2f10d [diff] |
Issue #21073: explain why Py_ReprEnter() allows for a missing thread state.
diff --git a/Objects/object.c b/Objects/object.c index c634e70..a1a69fa 100644 --- a/Objects/object.c +++ b/Objects/object.c
@@ -1849,6 +1849,8 @@ Py_ssize_t i; dict = PyThreadState_GetDict(); + /* Ignore a missing thread-state, so that this function can be called + early on startup. */ if (dict == NULL) return 0; list = _PyDict_GetItemId(dict, &PyId_Py_Repr);