[Bf-blender-cvs] [368bfa80f9e] master: Fix: Build issue with MSVC + Python 3.10

Ray Molenkamp noreply at git.blender.org
Tue Jan 25 15:54:41 CET 2022


Commit: 368bfa80f9e0d29a4b1a9c78be8a238c3e1ddcec
Author: Ray Molenkamp
Date:   Tue Jan 25 07:54:28 2022 -0700
Branches: master
https://developer.blender.org/rB368bfa80f9e0d29a4b1a9c78be8a238c3e1ddcec

Fix: Build issue with MSVC + Python 3.10

ssize_t is a posix type pyconfig.h previously
supplied for MSVC, it appears to have stopped
doing this in the python 3.10 headers.

Py_ssize_t is the type of the field this macro
actually returns, so best to to use that in our
code as well.

===================================================================

M	source/blender/python/intern/bpy_rna_operator.c

===================================================================

diff --git a/source/blender/python/intern/bpy_rna_operator.c b/source/blender/python/intern/bpy_rna_operator.c
index d3ec54fc12d..d24e2a77a75 100644
--- a/source/blender/python/intern/bpy_rna_operator.c
+++ b/source/blender/python/intern/bpy_rna_operator.c
@@ -103,7 +103,7 @@ PyDoc_STRVAR(BPY_rna_operator_poll_message_set_doc,
 
 static PyObject *BPY_rna_operator_poll_message_set(PyObject *UNUSED(self), PyObject *args)
 {
-  const ssize_t args_len = PyTuple_GET_SIZE(args);
+  const Py_ssize_t args_len = PyTuple_GET_SIZE(args);
   if (args_len == 0) {
     PyErr_SetString(PyExc_ValueError,
                     "poll_message_set(message, ...): requires a message argument");



More information about the Bf-blender-cvs mailing list