From 8b8f1945fbb07a46ecd6ed7ed52d11a156dce288 Mon Sep 17 00:00:00 2001 From: claudio Date: Fri, 5 Dec 2025 12:17:02 +0000 Subject: [PATCH] Another fallout when using gcc15. net/dico uses the wrong initalisation function for the PyTypeObject. This diff is equal to the one debian uses. ok bentley@ --- .../patches/patch-modules_python_python_c | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 net/dico/patches/patch-modules_python_python_c diff --git a/net/dico/patches/patch-modules_python_python_c b/net/dico/patches/patch-modules_python_python_c new file mode 100644 index 00000000000..60eac9bf49f --- /dev/null +++ b/net/dico/patches/patch-modules_python_python_c @@ -0,0 +1,23 @@ +fix builting with -Wint-conversion + +Index: modules/python/python.c +--- modules/python/python.c.orig ++++ modules/python/python.c +@@ -100,7 +100,7 @@ _PySelectionKey_str (PyObject *self) + } + + static PyTypeObject PySelectionKeyType = { +- PyObject_HEAD_INIT(&PyType_Type) ++ PyVarObject_HEAD_INIT(&PyType_Type, 0) + .tp_name = "DicoSelectionKey", + .tp_basicsize = sizeof (PySelectionKey), + .tp_dealloc = _PySelectionKey_dealloc, +@@ -185,7 +185,7 @@ _PyStrategy_str (PyObject *self) + } + + static PyTypeObject PyStrategyType = { +- PyObject_HEAD_INIT(&PyType_Type) ++ PyVarObject_HEAD_INIT(&PyType_Type, 0) + .tp_name = "DicoStrategy", + .tp_basicsize = sizeof (PyStrategy), + .tp_dealloc = _PyStrategy_dealloc,