Issue #13783: the PEP 380 implementation no longer expands the public C API
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 8c70b5c..6018e5b 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -97,7 +97,8 @@
/* Delay exception instantiation if we can */
PyErr_SetNone(PyExc_StopIteration);
} else {
- PyObject *e = PyStopIteration_Create(result);
+ PyObject *e = PyObject_CallFunctionObjArgs(
+ PyExc_StopIteration, result, NULL);
if (e != NULL) {
PyErr_SetObject(PyExc_StopIteration, e);
Py_DECREF(e);
@@ -339,7 +340,7 @@
Py_DECREF(ret);
/* Termination repetition of YIELD_FROM */
gen->gi_frame->f_lasti++;
- if (PyGen_FetchStopIterationValue(&val) == 0) {
+ if (_PyGen_FetchStopIterationValue(&val) == 0) {
ret = gen_send_ex(gen, val, 0);
Py_DECREF(val);
} else {
@@ -428,7 +429,7 @@
*/
int
-PyGen_FetchStopIterationValue(PyObject **pvalue) {
+_PyGen_FetchStopIterationValue(PyObject **pvalue) {
PyObject *et, *ev, *tb;
PyObject *value = NULL;