Skip to content

Commit

Permalink
address review: remove PyErr_NoMemory()
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Jan 24, 2025
1 parent 39ed5ea commit 4e76622
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Objects/longobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ _PyLong_FromDigits(int negative, Py_ssize_t digit_count, digit *digits)
}
PyLongObject *result = long_alloc(digit_count);
if (result == NULL) {
PyErr_NoMemory();
return NULL;
}
_PyLong_SetSignAndDigitCount(result, negative?-1:1, digit_count);
Expand Down Expand Up @@ -234,7 +233,6 @@ _PyLong_Copy(PyLongObject *src)
PyLongObject *result = long_alloc(size);

if (result == NULL) {
PyErr_NoMemory();
return NULL;
}
_PyLong_SetSignAndDigitCount(result, sign, size);
Expand Down

0 comments on commit 4e76622

Please sign in to comment.