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 a1f31af commit abf5016Copy full SHA for abf5016
2 files changed
Misc/ACKS
@@ -2079,6 +2079,7 @@ Xiang Zhang
2079
Robert Xiao
2080
Florent Xicluna
2081
Yanbo, Xie
2082
+Ivy Xu
2083
Kaisheng Xu
2084
Xinhang Xu
2085
Arnon Yaari
Objects/typeobject.c
@@ -4581,6 +4581,7 @@ _PyType_FromMetaclass_impl(
4581
Py_ssize_t name_buf_len = strlen(spec->name) + 1;
4582
_ht_tpname = PyMem_Malloc(name_buf_len);
4583
if (_ht_tpname == NULL) {
4584
+ PyErr_NoMemory();
4585
goto finally;
4586
}
4587
memcpy(_ht_tpname, spec->name, name_buf_len);
@@ -4862,7 +4863,7 @@ _PyType_FromMetaclass_impl(
4862
4863
4864
assert(_PyType_CheckConsistency(type));
4865
- finally:
4866
+finally:
4867
if (PyErr_Occurred()) {
4868
Py_CLEAR(res);
4869
0 commit comments