From 430aad874900f525c67a5aa5de9e6012a64ff603 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Thu, 22 Sep 2022 23:09:49 +0200 Subject: Fix runtime Python warnings for all # variants of formats. --- configure.ac | 2 +- plugins/pychrysalide/analysis/contents/memory.c | 2 +- plugins/yaml/python/reader.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index b9377b2..32a9c05 100644 --- a/configure.ac +++ b/configure.ac @@ -434,7 +434,7 @@ if test "x$python3_cfg_binary" = "xyes"; then LIBPYTHON_CFLAGS=`$pyprefix-config --cflags` LIBPYTHON_LIBS=`$pyprefix-config --libs` - LIBPYTHON_INTERPRETER_CFLAGS=`$pyprefix-config --cflags --embed` + LIBPYTHON_INTERPRETER_CFLAGS="`$pyprefix-config --cflags --embed` -DPY_SSIZE_T_CLEAN" LIBPYTHON_INTERPRETER_LIBS=`$pyprefix-config --libs --embed` LIBPYTHON_ABI_FLAGS=`$pyprefix-config --abiflags` pythondep=$pyprefix diff --git a/plugins/pychrysalide/analysis/contents/memory.c b/plugins/pychrysalide/analysis/contents/memory.c index 4782445..e0ab267 100644 --- a/plugins/pychrysalide/analysis/contents/memory.c +++ b/plugins/pychrysalide/analysis/contents/memory.c @@ -61,7 +61,7 @@ static PyObject *py_memory_content_new(PyTypeObject *type, PyObject *args, PyObj { PyObject *result; /* Instance à retourner */ const char *data; /* Tampon interne de Python */ - int length; /* Taille utilisé de ce tampon */ + Py_ssize_t length; /* Taille utilisé de ce tampon */ int ret; /* Bilan de lecture des args. */ GBinContent *content; /* Version GLib du contenu */ diff --git a/plugins/yaml/python/reader.c b/plugins/yaml/python/reader.c index f80623f..74fd2b3 100644 --- a/plugins/yaml/python/reader.c +++ b/plugins/yaml/python/reader.c @@ -73,7 +73,7 @@ static PyObject *py_yaml_reader_new_from_content(PyObject *self, PyObject *args) { PyObject *result; /* Instance à retourner */ const char *content; /* Contenu brut au format Yaml */ - int length; /* Taille de ce contenu */ + Py_ssize_t length; /* Taille de ce contenu */ int ret; /* Bilan de lecture des args. */ GYamlReader *reader; /* Création GLib à transmettre */ -- cgit v0.11.2-87-g4458