Skip to content

Commit

Permalink
[pyroot] fix clang warning due to changes in PyObject
Browse files Browse the repository at this point in the history
  • Loading branch information
silverweed authored and guitargeek committed Nov 8, 2024
1 parent 7977474 commit 56e8c0a
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions bindings/pyroot/cppyy/CPyCppyy/src/CPyCppyyModule.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,23 @@ static PyTypeObject PyDefault_t_Type = {

namespace {

PyObject _CPyCppyy_NullPtrStruct = {
_PyObject_EXTRA_INIT
1, &PyNullPtr_t_Type
};
PyObject _CPyCppyy_NullPtrStruct = {_PyObject_EXTRA_INIT
// In 3.12.0-beta this field was changed from a ssize_t to a union
#if PY_VERSION_HEX >= 0x30c00b1
{1},
#else
1,
#endif
&PyNullPtr_t_Type};

PyObject _CPyCppyy_DefaultStruct = {
_PyObject_EXTRA_INIT
1, &PyDefault_t_Type
};
PyObject _CPyCppyy_DefaultStruct = {_PyObject_EXTRA_INIT
// In 3.12.0-beta this field was changed from a ssize_t to a union
#if PY_VERSION_HEX >= 0x30c00b1
{1},
#else
1,
#endif
&PyDefault_t_Type};

// TODO: refactor with Converters.cxx
struct CPyCppyy_tagCDataObject { // non-public (but stable)
Expand Down

0 comments on commit 56e8c0a

Please sign in to comment.