From c5c212db711c1724d4f4d2c59c19a1b6d0912642 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 2 Jul 2024 18:51:15 +0300 Subject: [PATCH] imagingft: Replace PyDict_GetItem with PyDict_GetItemRef --- src/_imagingft.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_imagingft.c b/src/_imagingft.c index 1bef876e15c..abfc8d930c2 100644 --- a/src/_imagingft.c +++ b/src/_imagingft.c @@ -20,6 +20,7 @@ #define PY_SSIZE_T_CLEAN #include "Python.h" +#include "pythoncapi_compat_min.h" #include "libImaging/Imaging.h" #include @@ -1219,7 +1220,7 @@ font_getvarnames(FontObject *self) { } for (j = 0; j < num_namedstyles; j++) { - if (PyList_GetItem(list_names, j) != NULL) { + if (PyList_GetItemRef(list_names, j) != NULL) { continue; }