Skip to content

Commit

Permalink
Fix missing initializer for Python 3.13
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
bdegreve committed Aug 11, 2024
1 parent b493184 commit b19d9a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lass/python/class_definition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b19d9a8

Please sign in to comment.