From d2e2e53f733f8c8098035bbbc452bd1892796cb3 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Thu, 27 Apr 2023 16:19:43 -0600 Subject: gh-94673: Ensure Builtin Static Types are Readied Properly (gh-103940) There were cases where we do unnecessary work for builtin static types. This also simplifies some work necessary for a per-interpreter GIL. --- Python/thread.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Python/thread.c') diff --git a/Python/thread.c b/Python/thread.c index 4581f1af04..7fdedb0b9b 100644 --- a/Python/thread.c +++ b/Python/thread.c @@ -137,10 +137,8 @@ PyThread_GetInfo(void) int len; #endif - if (ThreadInfoType.tp_name == 0) { - if (_PyStructSequence_InitBuiltin(&ThreadInfoType, - &threadinfo_desc) < 0) - return NULL; + if (_PyStructSequence_InitBuiltin(&ThreadInfoType, &threadinfo_desc) < 0) { + return NULL; } threadinfo = PyStructSequence_New(&ThreadInfoType); -- cgit v1.2.1