From: Claudio Jeker Subject: fix for net/dico for -Wint-conversion To: "Anthony J. Bentley" Cc: ports@openbsd.org Date: Thu, 4 Dec 2025 17:35:54 +0100 Another fallout when using gcc15. net/dico uses the wrong initalisation function for the PyTypeObject. This diff is equal to the one debian uses for dico and it seems this is the common way such issues need to be fixed in modern python bindings. -- :wq Claudio Index: patches/patch-modules_python_python_c =================================================================== RCS file: patches/patch-modules_python_python_c diff -N patches/patch-modules_python_python_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-modules_python_python_c 4 Dec 2025 12:39:08 -0000 @@ -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,