Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rpm-software-management/createrepo_c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleš Matěj <amatej@redhat.com>2020-11-09 10:39:40 +0300
committerMarek Blaha <mblaha@redhat.com>2020-11-09 15:00:41 +0300
commit59b508f872d5200bc6b04c32de1793055ec07e4f (patch)
treef8f2fd68d652d6b62610b80f686aaa37d0c2e151
parent031f0524905c2a64a2faae555ca9d91281448d1b (diff)
Fix Python deprication (PY_SSIZE_T_CLEAN)
PyArg_ParseTuple() and formats which use # require the PY_SSIZE_T_CLEAN macro since python 3.10 For: https://github.com/rpm-software-management/createrepo_c/issues/234 This should also fix: https://bugzilla.redhat.com/show_bug.cgi?id=1891785
-rw-r--r--src/python/compression_wrapper-py.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/python/compression_wrapper-py.c b/src/python/compression_wrapper-py.c
index 0f470d5..f5692f4 100644
--- a/src/python/compression_wrapper-py.c
+++ b/src/python/compression_wrapper-py.c
@@ -17,6 +17,7 @@
* USA.
*/
+#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <assert.h>
#include <stddef.h>
@@ -205,7 +206,7 @@ static PyObject *
py_write(_CrFileObject *self, PyObject *args)
{
char *str;
- int len;
+ Py_ssize_t len;
GError *tmp_err = NULL;
if (!PyArg_ParseTuple(args, "s#:set_num_of_pkgs", &str, &len))