bpo-45953: Statically initialize all the non-object PyInterpreterState fields we can. (gh-30589)

https://bugs.python.org/issue45953
This commit is contained in:
Eric Snow 2022-01-13 17:17:28 -07:00 committed by GitHub
parent 324908ba93
commit 322f962f3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 25 deletions

View file

@ -134,6 +134,7 @@ struct _gc_runtime_state {
/* Current call-stack depth of tp_dealloc calls. */
int trash_delete_nesting;
/* Is automatic collection enabled? */
int enabled;
int debug;
/* linked lists of container objects */
@ -161,6 +162,7 @@ struct _gc_runtime_state {
Py_ssize_t long_lived_pending;
};
extern void _PyGC_InitState(struct _gc_runtime_state *);
extern Py_ssize_t _PyGC_CollectNoFail(PyThreadState *tstate);