Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions python/xnd/_xnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@
#endif
#endif

#if PY_VERSION_HEX >= 0x030B0000
/*
* name changed in python3.11
* https://github.com/python/cpython/pull/31657
*/
#define _PyFloat_Pack2 PyFloat_Pack2
#define _PyFloat_Pack4 PyFloat_Pack4
#define _PyFloat_Pack8 PyFloat_Pack8
#define _PyFloat_Unpack2 PyFloat_Unpack2
#define _PyFloat_Unpack4 PyFloat_Unpack4
#define _PyFloat_Unpack8 PyFloat_Unpack8
#endif


/****************************************************************************/
/* Error handling */
Expand Down
6 changes: 6 additions & 0 deletions python/xnd/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@


#include <Python.h>
#if PY_VERSION_HEX < 0x030B0000
/*
* Python 3.11 moved longintrepr.h and it is already included in Python.h
* https://github.com/python/cpython/pull/28968
*/
#include <longintrepr.h>
#endif
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
Expand Down