Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-08-09 15:55:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-09 15:55:41 +0300
commit6fe00939b0a471cc149ea5b3c63ca57b049b4a37 (patch)
tree832fdacb80be0aa93fc8d2f0c0d167dd7e4a6664 /source/blender/python
parent6deb37474eb082400ccd9d0cac0459116f24aacf (diff)
PyAPI: resolve build error with Python 3.10
Resolves T89931
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/mathutils/mathutils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 5beca7bd71a..be7dae6871b 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -95,7 +95,11 @@ Py_hash_t mathutils_array_hash(const float *array, size_t array_len)
x = 0x345678UL;
i = 0;
while (--len >= 0) {
+#if PY_VERSION_HEX >= 0x30a0000 /* Version: 3.10. */
+ y = _Py_HashDouble(NULL, (double)(array[i++]));
+#else
y = _Py_HashDouble((double)(array[i++]));
+#endif
if (y == -1) {
return -1;
}