Skip to content

Commit ed2a430

Browse files
committed
Use _PyLong_FromSTwoDigits not PyLong_FromLong in long_add.
1 parent e43060a commit ed2a430

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/longobject.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3084,7 +3084,7 @@ long_add(PyLongObject *a, PyLongObject *b)
30843084
CHECK_BINOP(a, b);
30853085

30863086
if (IS_MEDIUM_VALUE(a) && IS_MEDIUM_VALUE(b)) {
3087-
return PyLong_FromLong(medium_value(a) + medium_value(b));
3087+
return _PyLong_FromSTwoDigits(medium_value(a) + medium_value(b));
30883088
}
30893089
if (Py_SIZE(a) < 0) {
30903090
if (Py_SIZE(b) < 0) {

0 commit comments

Comments
 (0)