From: Michael Tremer Date: Wed, 8 Dec 2021 16:11:19 +0000 (+0000) Subject: _pakfire: Fix deprecation warning for PyBuildValue that uses # X-Git-Tag: 0.9.28~858 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16495755ddaae4c1c0a12ba4f593756b5efd2b13;p=pakfire.git _pakfire: Fix deprecation warning for PyBuildValue that uses # Signed-off-by: Michael Tremer --- diff --git a/src/_pakfire/pakfire.c b/src/_pakfire/pakfire.c index 9c4401d3e..c6c2419ad 100644 --- a/src/_pakfire/pakfire.c +++ b/src/_pakfire/pakfire.c @@ -18,6 +18,7 @@ # # #############################################################################*/ +#define PY_SSIZE_T_CLEAN #include #include @@ -674,7 +675,7 @@ static int __Pakfire_execute_logging_callback(struct pakfire* pakfire, void* dat length--; // Create tuple with arguments for the callback function - PyObject* args = Py_BuildValue("(is#)", priority, line, length); + PyObject* args = Py_BuildValue("(is#)", priority, line, (Py_ssize_t)length); if (!args) return 1;