From b19d9a88b2643e43205637d8ee8121c592de484b Mon Sep 17 00:00:00 2001 From: Bram de Greve Date: Wed, 31 Jul 2024 22:52:39 +0200 Subject: [PATCH] Fix missing initializer for Python 3.13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Building with Python 3.13 on Linux with GCC 11 yields following warning: In constructor ‘lass::python::impl::ClassDefinition::ClassDefinition(const char*, const char*, Py_ssize_t, richcmpfunc, lass::python::impl::ClassDefinition*, lass::python::impl::ClassDefinition::TClassRegisterHook)’: lass/lass/python/class_definition.cpp:168:9: warning: missing initializer for member ‘_typeobject::tp_versions_used’ [-Wmissing-field-initializers] --- lass/python/class_definition.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lass/python/class_definition.cpp b/lass/python/class_definition.cpp index 609cd6c4..dd484247 100644 --- a/lass/python/class_definition.cpp +++ b/lass/python/class_definition.cpp @@ -164,6 +164,9 @@ ClassDefinition::ClassDefinition( #endif #if PY_VERSION_HEX >= 0x030C0000 // >= 3.12 0, /*tp_watched, internal only */ +#endif +#if PY_VERSION_HEX >= 0x030D0000 // >= 3.13 + 0, /*tp_versions_used */ #endif }; type_ = type;