Skip to content

Commit a17e9db

Browse files
committed
FastDSS: better compatibility with Python 3.7
1 parent 045b282 commit a17e9db

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/_fastdss.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@
1111
// #define Py_LIMITED_API 0x03070000
1212
#include <string.h>
1313
#include <Python.h>
14+
#include <structmember.h>
1415
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
1516
#include "numpy/ndarrayobject.h"
1617
#include "dss_capi_ctx.h"
1718

19+
#ifndef Py_T_OBJECT_EX
20+
// For older Python releases
21+
#define Py_T_OBJECT_EX T_OBJECT
22+
#endif
23+
1824
// #ifndef PyList_SET_ITEM
1925
// #define PyList_SET_ITEM PyList_SetItem
2026
// #endif

0 commit comments

Comments
 (0)