bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (GH-11617)
This involves moving the global "pending calls" state to PyInterpreterState.
https://bugs.python.org/issue33608
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 350ef77..5b0da78 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2445,6 +2445,7 @@
Py_INCREF(callable);
Py_BEGIN_ALLOW_THREADS
+ /* XXX Use the internal _Py_AddPendingCall(). */
r = Py_AddPendingCall(&_pending_callback, callable);
Py_END_ALLOW_THREADS