summaryrefslogtreecommitdiffstats
path: root/Modules/gcmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r--Modules/gcmodule.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 5a6a81d..7a37a16 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -1480,6 +1480,10 @@ static PyObject *
gc_get_referrers(PyObject *self, PyObject *args)
{
int i;
+ if (PySys_Audit("gc.get_referrers", "O", args) < 0) {
+ return NULL;
+ }
+
PyObject *result = PyList_New(0);
if (!result) return NULL;
@@ -1508,6 +1512,9 @@ static PyObject *
gc_get_referents(PyObject *self, PyObject *args)
{
Py_ssize_t i;
+ if (PySys_Audit("gc.get_referents", "O", args) < 0) {
+ return NULL;
+ }
PyObject *result = PyList_New(0);
if (result == NULL)
@@ -1549,6 +1556,10 @@ gc_get_objects_impl(PyObject *module, Py_ssize_t generation)
PyObject* result;
struct _gc_runtime_state *state = &_PyRuntime.gc;
+ if (PySys_Audit("gc.get_objects", "n", generation) < 0) {
+ return NULL;
+ }
+
result = PyList_New(0);
if (result == NULL) {
return NULL;