Skip to content

Commit 191867f

Browse files
authored
Define Py_hash_t for versions that don't know it (#179)
Closes #178
1 parent 98c9fcf commit 191867f

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
# Set this first for easier replacement
19-
version = "2021.8.25.12.59.41"
19+
version = "2021.8.26.15.40.13"
2020

2121
if "win" in platform.lower() and not "darwin" in platform.lower():
2222
extra_compile_args = ["/O2"]

src/numpy_quaternion.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,9 @@ pyquaternion_richcompare(PyObject* a, PyObject* b, int op)
783783
#if PY_VERSION_HEX > 0x030a00a6
784784
#define _newpy_HashDouble _Py_HashDouble
785785
#else
786+
#if PY_VERSION_HEX < 0x030200a1
787+
#define Py_hash_t long
788+
#endif
786789
static NPY_INLINE Py_hash_t
787790
_newpy_HashDouble(PyObject *NPY_UNUSED(ignored), double val)
788791
{

src/quaternion/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2020, Michael Boyle
22
# See LICENSE file for details: <https://github.com/moble/quaternion/blob/main/LICENSE>
33

4-
__version__ = "2021.8.25.12.59.41"
4+
__version__ = "2021.8.26.15.40.13"
55
__doc_title__ = "Quaternion dtype for NumPy"
66
__doc__ = "Adds a quaternion dtype to NumPy."
77
__all__ = ['quaternion',

0 commit comments

Comments
 (0)