summaryrefslogtreecommitdiffstats
path: root/Lib/test/_testcppext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/_testcppext.cpp')
-rw-r--r--Lib/test/_testcppext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/_testcppext.cpp b/Lib/test/_testcppext.cpp
index eade7cc..70f434e 100644
--- a/Lib/test/_testcppext.cpp
+++ b/Lib/test/_testcppext.cpp
@@ -74,6 +74,10 @@ test_api_casts(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args))
Py_INCREF(strong_ref);
Py_DECREF(strong_ref);
+ // gh-93442: Pass 0 as NULL for PyObject*
+ Py_XINCREF(0);
+ Py_XDECREF(0);
+
Py_DECREF(obj);
Py_RETURN_NONE;
}