Skip to content

Commit bff2fbc

Browse files
Merge branch 'main' into optimize-callmethod-vectorcall
2 parents b3f203e + f4f1020 commit bff2fbc

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

Doc/library/curses.ascii.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ C library:
130130

131131
.. function:: isgraph(c)
132132

133-
Checks for ASCII any printable character except space.
133+
Checks for any ASCII printable character except space.
134134

135135

136136
.. function:: islower(c)
@@ -145,7 +145,7 @@ C library:
145145

146146
.. function:: ispunct(c)
147147

148-
Checks for any printable ASCII character which is not a space or an alphanumeric
148+
Checks for any ASCII printable character which is not a space or an alphanumeric
149149
character.
150150

151151

Doc/library/functions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ are always available. They are listed here in alphabetical order.
485485
:noindex:
486486
487487
Create a new dictionary. The :class:`dict` object is the dictionary class.
488-
See :class:`dict` and :ref:`typesmapping` for documentation about this class.
488+
See also :ref:`typesmapping` for documentation about this class.
489489

490490
For other containers see the built-in :class:`frozendict`, :class:`list`,
491491
:class:`set`, and :class:`tuple` classes, as well as the :mod:`collections` module.
@@ -873,7 +873,7 @@ are always available. They are listed here in alphabetical order.
873873
:noindex:
874874
875875
Create a new frozen dictionary. The :class:`frozendict` object is a built-in class.
876-
See :class:`frozendict` and :ref:`typesmapping` for documentation about this class.
876+
See also :ref:`typesmapping` for documentation about this class.
877877

878878
For other containers see the built-in :class:`dict`, :class:`list`, :class:`set`,
879879
and :class:`tuple` classes, as well as the :mod:`collections` module.
@@ -886,7 +886,7 @@ are always available. They are listed here in alphabetical order.
886886
:noindex:
887887

888888
Return a new :class:`frozenset` object, optionally with elements taken from
889-
*iterable*. ``frozenset`` is a built-in class. See :class:`frozenset` and
889+
*iterable*. :class:`frozenset` is a built-in class. See also
890890
:ref:`types-set` for documentation about this class.
891891

892892
For other containers see the built-in :class:`set`, :class:`list`,
@@ -1814,7 +1814,7 @@ are always available. They are listed here in alphabetical order.
18141814
:noindex:
18151815

18161816
Return a new :class:`set` object, optionally with elements taken from
1817-
*iterable*. ``set`` is a built-in class. See :class:`set` and
1817+
*iterable*. :class:`set` is a built-in class. See also
18181818
:ref:`types-set` for documentation about this class.
18191819

18201820
For other containers see the built-in :class:`frozenset`, :class:`list`,
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix crash on unset :exc:`MemoryError` on allocation failure in
2+
:func:`ctypes.get_errno`.

Modules/_ctypes/callproc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,9 @@ _ctypes_get_errobj(ctypes_state *st, int **pspace)
168168
}
169169
else {
170170
void *space = PyMem_Calloc(2, sizeof(int));
171-
if (space == NULL)
172-
return NULL;
171+
if (space == NULL) {
172+
return PyErr_NoMemory();
173+
}
173174
errobj = PyCapsule_New(space, CTYPES_CAPSULE_NAME_PYMEM, pymem_destructor);
174175
if (errobj == NULL) {
175176
PyMem_Free(space);

0 commit comments

Comments
 (0)