summaryrefslogtreecommitdiffstats
path: root/Objects/genobject.c
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2012-06-17 05:15:49 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2012-06-17 05:15:49 (GMT)
commitc40bc09942f9532ed957dc8cd4da269ec089e830 (patch)
treef2596be6a738f230f6be4776f7f42d6925a3d747 /Objects/genobject.c
parent8d5c0b8c198374d0b88f30f04dd29d1f19c1c913 (diff)
downloadcpython-c40bc09942f9532ed957dc8cd4da269ec089e830.zip
cpython-c40bc09942f9532ed957dc8cd4da269ec089e830.tar.gz
cpython-c40bc09942f9532ed957dc8cd4da269ec089e830.tar.bz2
Issue #13783: the PEP 380 implementation no longer expands the public C API
Diffstat (limited to 'Objects/genobject.c')
-rw-r--r--Objects/genobject.c7
1 files changed, 4 insertions, 3 deletions
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 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc)
/* 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 @@ gen_throw(PyGenObject *gen, PyObject *args)
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 @@ gen_iternext(PyGenObject *gen)
*/
int
-PyGen_FetchStopIterationValue(PyObject **pvalue) {
+_PyGen_FetchStopIterationValue(PyObject **pvalue) {
PyObject *et, *ev, *tb;
PyObject *value = NULL;