From 3edd2225388405acf8ac26e8f9182aadc814e397 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Wed, 4 Sep 2024 11:17:58 +0300 Subject: [PATCH] + adjust for API changes --- Modules/_decimal/_decimal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index b7c8f6e32e03b63..53656e651be4205 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -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) {