summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-07-22 20:24:54 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-07-22 20:24:54 (GMT)
commit1c8f059019d79f1891f42a2656a96919a1187967 (patch)
treebcec768e9ca0d0e1e9e1ab80e0dfc0fe29ae758d /Include
parent2a545099f7ed45de1d45b45200d82c6298b75d2b (diff)
downloadcpython-1c8f059019d79f1891f42a2656a96919a1187967.zip
cpython-1c8f059019d79f1891f42a2656a96919a1187967.tar.gz
cpython-1c8f059019d79f1891f42a2656a96919a1187967.tar.bz2
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
Diffstat (limited to 'Include')
-rw-r--r--Include/pythonrun.h2
-rw-r--r--Include/structseq.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index 66766dd..1a40b06 100644
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -197,7 +197,7 @@ PyAPI_FUNC(void) _PyImport_Init(void);
PyAPI_FUNC(void) _PyExc_Init(PyObject * bltinmod);
PyAPI_FUNC(void) _PyImportHooks_Init(void);
PyAPI_FUNC(int) _PyFrame_Init(void);
-PyAPI_FUNC(void) _PyFloat_Init(void);
+PyAPI_FUNC(int) _PyFloat_Init(void);
PyAPI_FUNC(int) PyByteArray_Init(void);
PyAPI_FUNC(void) _PyRandom_Init(void);
#endif
diff --git a/Include/structseq.h b/Include/structseq.h
index 30c52ac..af22716 100644
--- a/Include/structseq.h
+++ b/Include/structseq.h
@@ -24,6 +24,8 @@ extern char* PyStructSequence_UnnamedField;
#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);