Skip to content

Commit

Permalink
+ adjust for API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Sep 4, 2024
1 parent 124b42d commit 3edd222
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/_decimal/_decimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -3610,7 +3610,7 @@ dec_as_long(PyObject *dec, PyObject *context, int round)
n = (mpd_sizeinbase(x, 2) +
layout->bits_per_digit - 1) / layout->bits_per_digit;
PyLongWriter *writer = PyLongWriter_Create(mpd_isnegative(x), n,
&ob_digit, layout);
(void**)&ob_digit, layout);
/* mpd_sizeinbase can overestimate size by 1 digit, set it to zero. */
ob_digit[n-1] = 0;
if (writer == NULL) {
Expand Down

0 comments on commit 3edd222

Please sign in to comment.