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

@ -1596,6 +1596,15 @@ PyGC_Collect(void)
return n;
}
Py_ssize_t
_PyGC_CollectIfEnabled(void)
{
if (!enabled)
return 0;
return PyGC_Collect();
}
Py_ssize_t
_PyGC_CollectNoFail(void)
{