[Python-checkins] cpython: whatsnew: PyStructSequence_InitType2, Victor's MemoryError fixes.
r.david.murray
python-checkins at python.org
Sat Feb 22 22:34:47 CET 2014
http://hg.python.org/cpython/rev/ff30ddaab7e8
changeset: 89326:ff30ddaab7e8
user: R David Murray <rdmurray at bitdance.com>
date: Sat Feb 22 16:02:22 2014 -0500
summary:
whatsnew: PyStructSequence_InitType2, Victor's MemoryError fixes.
I'm documenting this new function, but I'm wondering if this will trigger
someone to think about whether or not this actually makes sense :)
files:
Doc/c-api/tuple.rst | 8 ++++++++
Doc/whatsnew/3.4.rst | 8 ++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/Doc/c-api/tuple.rst b/Doc/c-api/tuple.rst
--- a/Doc/c-api/tuple.rst
+++ b/Doc/c-api/tuple.rst
@@ -129,6 +129,14 @@
Initializes a struct sequence type *type* from *desc* in place.
+.. c:function:: void PyStructSequence_InitType2(PyTypeObject *type, PyStructSequence_Desc *desc)
+
+ The same as ``PyStructSequence_InitType``, but returns ``0`` on success and ``-1`` on
+ failure.
+
+ .. versionadded:: 3.4
+
+
.. c:type:: PyStructSequence_Desc
Contains the meta information of a struct sequence type to create.
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -1421,6 +1421,10 @@
specifications for ``%s``, ``%A``, ``%U``, ``%V``, ``%S``, and ``%R``.
(Contributed by Ysj Ray and Victor Stinner in :issue:`7330`.)
+* New function :c:func:`PyStructSequence_InitType2` supplements the
+ existing :c:func:`PyStructSequence_InitType` function. The difference
+ is that it returns ``0`` on success and ``-1`` on failure.
+
.. _other-improvements-3.4:
@@ -1466,6 +1470,10 @@
uses of :ref:`__prepare__ <prepare>`. (Contributed by Benjamin Peterson in
:issue:`17853`.)
+* A number of MemoryError-related crashes were identified and fixed by Victor
+ Stinner using his :pep:`445`-based ``pyfailmalloc`` tool (:issue:`18408`,
+ :issue:`18520`).
+
Significant Optimizations
-------------------------
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list