From 149de8cd0b495d9aad8cb449142b5908122026f7 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 13 Jul 2021 13:21:01 +0200 Subject: [PATCH] python: clear warnings about PY_SSIZE_T_CLEAN (#55561) Using the python3 bindings on recent python3 >=3.8 versions shows: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats https://docs.python.org/3.9/whatsnew/changelog.html?highlight=py_ssize_t_clean#id193 --- bindings/python/wrapper_top.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bindings/python/wrapper_top.c b/bindings/python/wrapper_top.c index df3359ec..22d20c9a 100644 --- a/bindings/python/wrapper_top.c +++ b/bindings/python/wrapper_top.c @@ -7,6 +7,8 @@ #include "../../lasso/utils.h" #include "../utils.c" +#define PY_SSIZE_T_CLEAN + #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX