diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2014-03-31 20:05:02 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2014-03-31 20:05:02 (GMT) |
commit | 3fec24ef135c947de7538c1c0495115eea3035c9 (patch) | |
tree | dec0f0c9664332caf96fc71c2d681013374a4c9d /Objects | |
parent | 934a2957ba1b56eb363933a26e2b26fa160130fe (diff) | |
parent | 04d17d30b4cd8bc751055dade76179597513099d (diff) | |
download | cpython-3fec24ef135c947de7538c1c0495115eea3035c9.zip cpython-3fec24ef135c947de7538c1c0495115eea3035c9.tar.gz cpython-3fec24ef135c947de7538c1c0495115eea3035c9.tar.bz2 |
Issue #21073: explain why Py_ReprEnter() allows for a missing thread state.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/object.c | 2 |
1 files changed, 2 insertions, 0 deletions
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_ReprEnter(PyObject *obj) 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); |