Skip to content

Commit 4e76622

Browse files
committed
address review: remove PyErr_NoMemory()
1 parent 39ed5ea commit 4e76622

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Objects/longobject.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ _PyLong_FromDigits(int negative, Py_ssize_t digit_count, digit *digits)
205205
}
206206
PyLongObject *result = long_alloc(digit_count);
207207
if (result == NULL) {
208-
PyErr_NoMemory();
209208
return NULL;
210209
}
211210
_PyLong_SetSignAndDigitCount(result, negative?-1:1, digit_count);
@@ -234,7 +233,6 @@ _PyLong_Copy(PyLongObject *src)
234233
PyLongObject *result = long_alloc(size);
235234

236235
if (result == NULL) {
237-
PyErr_NoMemory();
238236
return NULL;
239237
}
240238
_PyLong_SetSignAndDigitCount(result, sign, size);

0 commit comments

Comments
 (0)