Mercurial > cpython-lru_cache-weakref
diff Include/structseq.h @ 84793:fc718c177ee6
Issue #18520: Add a new PyStructSequence_InitType2() function, same than
PyStructSequence_InitType() except that it has a return value (0 on success,
-1 on error).
* PyStructSequence_InitType2() now raises MemoryError on memory allocation failure
* Fix also some calls to PyDict_SetItemString(): handle error
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Mon, 22 Jul 2013 22:24:54 +0200 |
| parents | 62b61abd02b8 |
| children |
line wrap: on
line diff
--- a/Include/structseq.h Mon Jul 22 13:08:21 2013 -0500 +++ b/Include/structseq.h Mon Jul 22 22:24:54 2013 +0200 @@ -24,6 +24,8 @@ #ifndef Py_LIMITED_API PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type, PyStructSequence_Desc *desc); +PyAPI_FUNC(int) PyStructSequence_InitType2(PyTypeObject *type, + PyStructSequence_Desc *desc); #endif PyAPI_FUNC(PyTypeObject*) PyStructSequence_NewType(PyStructSequence_Desc *desc);
