summaryrefslogtreecommitdiffstats
path: root/Python/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/thread.c')
-rw-r--r--Python/thread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/thread.c b/Python/thread.c
index 54ce875..8540942 100644
--- a/Python/thread.c
+++ b/Python/thread.c
@@ -399,8 +399,10 @@ PyThread_GetInfo(void)
int len;
#endif
- if (ThreadInfoType.tp_name == 0)
- PyStructSequence_InitType(&ThreadInfoType, &threadinfo_desc);
+ if (ThreadInfoType.tp_name == 0) {
+ if (PyStructSequence_InitType2(&ThreadInfoType, &threadinfo_desc) < 0)
+ return NULL;
+ }
threadinfo = PyStructSequence_New(&ThreadInfoType);
if (threadinfo == NULL)