[Bf-blender-cvs] [690fa2ba86a] blender-v2.93-release: PyAPI: resolve build error with Python 3.10
Campbell Barton
noreply at git.blender.org
Mon Aug 23 09:35:48 CEST 2021
Commit: 690fa2ba86a05b3196a8bc4f78df47f3d5da9b51
Author: Campbell Barton
Date: Mon Aug 9 22:55:41 2021 +1000
Branches: blender-v2.93-release
https://developer.blender.org/rB690fa2ba86a05b3196a8bc4f78df47f3d5da9b51
PyAPI: resolve build error with Python 3.10
Resolves T89931
===================================================================
M source/blender/python/mathutils/mathutils.c
===================================================================
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 3791a6c2d29..ad65b23ba3d 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;
}
More information about the Bf-blender-cvs
mailing list