Issue #27336: Fix compilation failures --without-threads
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c
index d5a13fe..e9d3082 100644
--- a/Parser/pgenmain.c
+++ b/Parser/pgenmain.c
@@ -38,12 +38,13 @@
 }
 
 #ifdef WITH_THREAD
-/* Functions needed by obmalloc.c */
+/* Needed by obmalloc.c */
 int PyGILState_Check(void)
 { return 1; }
+#endif
+
 void _PyMem_DumpTraceback(int fd, const void *ptr)
 {}
-#endif
 
 int
 main(int argc, char **argv)