Mercurial > cpython-lru_cache-weakref
diff Include/pyerrors.h @ 74356:d64ac9ab4cd0
Implement PEP 380 - 'yield from' (closes #11682)
| author | Nick Coghlan <ncoghlan@gmail.com> |
|---|---|
| date | Fri, 13 Jan 2012 21:43:40 +1000 |
| parents | 41a1de81ef2b |
| children | b299c4f31ff2 |
line wrap: on
line diff
--- a/Include/pyerrors.h Thu Jan 12 21:10:29 2012 -0500 +++ b/Include/pyerrors.h Fri Jan 13 21:43:40 2012 +1000 @@ -51,6 +51,11 @@ Py_ssize_t written; /* only for BlockingIOError, -1 otherwise */ } PyOSErrorObject; +typedef struct { + PyException_HEAD + PyObject *value; +} PyStopIterationObject; + /* Compatibility typedefs */ typedef PyOSErrorObject PyEnvironmentErrorObject; #ifdef MS_WINDOWS @@ -380,6 +385,8 @@ const char *reason /* UTF-8 encoded string */ ); +/* create a StopIteration exception with the given value */ +PyAPI_FUNC(PyObject *) PyStopIteration_Create(PyObject *); /* These APIs aren't really part of the error implementation, but often needed to format error messages; the native C lib APIs are
