summaryrefslogtreecommitdiff
path: root/dev-python/gmpy/files/gmpy-2.1.0_beta5-pyhash-nan.patch
blob: 9f59a6096fcdbebe52f874b2e05e99c855927e54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/gmpy2_hash.c b/src/gmpy2_hash.c
index f276a42..1d2bfd1 100644
--- a/src/gmpy2_hash.c
+++ b/src/gmpy2_hash.c
@@ -147,7 +147,12 @@ _mpfr_hash(mpfr_t f)
             }
         }
         else {
+#if PY_VERSION_HEX >= 0x030A00A0
+            // Python 3.10
+            return _Py_HashPointer(f);
+#else
             return _PyHASH_NAN;
+#endif
         }
     }