blob: ce6c34fa133300408679bf42761a2a7ffcd72200 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#ifndef NUMPY_CORE_SRC_COMMON_NPY_PYCOMPAT_H_
#define NUMPY_CORE_SRC_COMMON_NPY_PYCOMPAT_H_
#include "numpy/npy_3kcompat.h"
/*
* In Python 3.10a7 (or b1), python started using the identity for the hash
* when a value is NaN. See https://bugs.python.org/issue43475
*/
#if PY_VERSION_HEX > 0x030a00a6
#define Npy_HashDouble _Py_HashDouble
#else
static inline Py_hash_t
Npy_HashDouble(PyObject *NPY_UNUSED(identity), double val)
{
return _Py_HashDouble(val);
}
#endif
#endif /* NUMPY_CORE_SRC_COMMON_NPY_PYCOMPAT_H_ */
|