aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Langa <lukasz@langa.pl>2016-09-09 21:47:46 -0700
committerŁukasz Langa <lukasz@langa.pl>2016-09-09 21:47:46 -0700
commitfef7e94fa12f21c09997bd02809e677830966646 (patch)
tree2f355b7146c4eb0426b93c29ac96072824361c13 /Include/objimpl.h
parentUse raw string for regexp (3.5->3.6) (diff)
downloadcpython-fef7e94fa12f21c09997bd02809e677830966646.tar.gz
cpython-fef7e94fa12f21c09997bd02809e677830966646.tar.bz2
cpython-fef7e94fa12f21c09997bd02809e677830966646.zip
Don't run garbage collection on interpreter exit if it was explicitly disabled
by the user.
Diffstat (limited to 'Include/objimpl.h')
-rw-r--r--Include/objimpl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/objimpl.h b/Include/objimpl.h
index 65b6d91c36..519ae51605 100644
--- a/Include/objimpl.h
+++ b/Include/objimpl.h
@@ -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 */