Skip to content

Commit cb169f7

Browse files
skirpichevvstinner
andauthored
Apply suggestions from code review
Co-authored-by: Victor Stinner <[email protected]>
1 parent 83471fd commit cb169f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_decimal/_decimal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,9 +2352,9 @@ dec_from_long(decimal_state *state, PyTypeObject *type, PyObject *v,
23522352
else {
23532353
const int64_t value = export_long.value;
23542354

2355-
if (INT32_MIN <= value && value <= INT32_MAX) {
2355+
if (-UINT32_MAX <= value && value <= UINT32_MAX) {
23562356
_dec_settriple(dec, value < 0 ? MPD_NEG : MPD_POS,
2357-
Py_ABS(value), 0);
2357+
(uint32_t)Py_ABS(value), 0);
23582358
mpd_qfinalize(MPD(dec), ctx, status);
23592359
}
23602360
else {

0 commit comments

Comments
 (0)