bpo-38631: Avoid Py_FatalError() in handle_legacy_finalizers() (GH-17266)

* Rename _PyGC_Initialize() to _PyGC_InitializeRuntime()
* Add _PyGC_Init(): initialize _PyRuntime.gc.garbage list
* Call _PyGC_Init() before _PyTypes_Init()
This commit is contained in:
Victor Stinner 2019-11-20 01:18:11 +01:00 committed by GitHub
parent e0cd8aa70a
commit 444b39bb64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 12 deletions

View file

@ -57,6 +57,7 @@ extern PyStatus _Py_HashRandomization_Init(const PyConfig *);
extern PyStatus _PyTypes_Init(void);
extern PyStatus _PyImportZip_Init(PyThreadState *tstate);
extern PyStatus _PyGC_Init(struct pyruntimestate *runtime);
/* Various internal finalizers */