Don't run garbage collection on interpreter exit if it was explicitly disabled

by the user.
This commit is contained in:
Łukasz Langa 2016-09-09 21:47:46 -07:00
parent 9e3ef52a35
commit fef7e94fa1
3 changed files with 14 additions and 4 deletions

View file

@ -224,11 +224,12 @@ PyAPI_FUNC(void) PyObject_SetArenaAllocator(PyObjectArenaAllocator *allocator);
* ==========================
*/
/* C equivalent of gc.collect(). */
/* C equivalent of gc.collect() which ignores the state of gc.enabled. */
PyAPI_FUNC(Py_ssize_t) PyGC_Collect(void);
#ifndef Py_LIMITED_API
PyAPI_FUNC(Py_ssize_t) _PyGC_CollectNoFail(void);
PyAPI_FUNC(Py_ssize_t) _PyGC_CollectIfEnabled(void);
#endif
/* Test if a type has a GC head */