We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PyErr_NoMemory()
type_from_slots_or_spec
1 parent b471b4a commit 72153b5Copy full SHA for 72153b5
2 files changed
Misc/ACKS
@@ -2108,6 +2108,7 @@ Xiang Zhang
2108
Robert Xiao
2109
Florent Xicluna
2110
Yanbo, Xie
2111
+Ivy Xu
2112
Kaisheng Xu
2113
Xinhang Xu
2114
Arnon Yaari
Objects/typeobject.c
@@ -5114,6 +5114,7 @@ PyType_FromMetaclass(
5114
Py_ssize_t name_buf_len = strlen(spec->name) + 1;
5115
_ht_tpname = PyMem_Malloc(name_buf_len);
5116
if (_ht_tpname == NULL) {
5117
+ PyErr_NoMemory();
5118
goto finally;
5119
}
5120
memcpy(_ht_tpname, spec->name, name_buf_len);
@@ -5397,7 +5398,7 @@ PyType_FromMetaclass(
5397
5398
5399
assert(_PyType_CheckConsistency(type));
5400
- finally:
5401
+finally:
5402
if (PyErr_Occurred()) {
5403
Py_CLEAR(res);
5404
0 commit comments