[Bf-blender-cvs] [7537369498b] master: Python: remove invalid Py_TPFLAGS_HAVE_GC usage

Campbell Barton noreply at git.blender.org
Tue Jul 5 06:00:14 CEST 2022


Commit: 7537369498bf61f872554b0ce2efc439008165a4
Author: Campbell Barton
Date:   Tue Jul 5 13:41:49 2022 +1000
Branches: master
https://developer.blender.org/rB7537369498bf61f872554b0ce2efc439008165a4

Python: remove invalid Py_TPFLAGS_HAVE_GC usage

Blender wouldn't start with Python 3.11 because of an error in
Py_TPFLAGS_HAVE_GC usage for `bpy.app.handlers.persistent`.
Remove this flag as it's not necessary.

Part of fix for T99277.

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

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

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

diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index 641727927ec..8c5fb22eab1 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -145,41 +145,41 @@ static PyTypeObject BPyPersistent_Type = {
     0,                /* tp_basicsize */
     0,                /* tp_itemsize */
     /* methods */
-    0,                                                             /* tp_dealloc */
-    0,                                                             /* tp_print */
-    0,                                                             /* tp_getattr */
-    0,                                                             /* tp_setattr */
-    0,                                                             /* tp_reserved */
-    0,                                                             /* tp_repr */
-    0,                                                             /* tp_as_number */
-    0,                                                             /* tp_as_sequence */
-    0,                                                             /* tp_as_mapping */
-    0,                                                             /* tp_hash */
-    0,                                                             /* tp_call */
-    0,                                                             /* tp_str */
-    0,                                                             /* tp_getattro */
-    0,                                                             /* tp_setattro */
-    0,                                                             /* tp_as_buffer */
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, /* tp_flags */
-    0,                                                             /* tp_doc */
-    0,                                                             /* tp_traverse */
-    0,                                                             /* tp_clear */
-    0,                                                             /* tp_richcompare */
-    0,                                                             /* tp_weaklistoffset */
-    0,                                                             /* tp_iter */
-    0,                                                             /* tp_iternext */
-    0,                                                             /* tp_methods */
-    0,                                                             /* tp_members */
-    0,                                                             /* tp_getset */
-    0,                                                             /* tp_base */
-    0,                                                             /* tp_dict */
-    0,                                                             /* tp_descr_get */
-    0,                                                             /* tp_descr_set */
-    0,                                                             /* tp_dictoffset */
-    0,                                                             /* tp_init */
-    0,                                                             /* tp_alloc */
-    bpy_app_handlers_persistent_new,                               /* tp_new */
-    0,                                                             /* tp_free */
+    0,                                        /* tp_dealloc */
+    0,                                        /* tp_print */
+    0,                                        /* tp_getattr */
+    0,                                        /* tp_setattr */
+    0,                                        /* tp_reserved */
+    0,                                        /* tp_repr */
+    0,                                        /* tp_as_number */
+    0,                                        /* tp_as_sequence */
+    0,                                        /* tp_as_mapping */
+    0,                                        /* tp_hash */
+    0,                                        /* tp_call */
+    0,                                        /* tp_str */
+    0,                                        /* tp_getattro */
+    0,                                        /* tp_setattro */
+    0,                                        /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+    0,                                        /* tp_doc */
+    0,                                        /* tp_traverse */
+    0,                                        /* tp_clear */
+    0,                                        /* tp_richcompare */
+    0,                                        /* tp_weaklistoffset */
+    0,                                        /* tp_iter */
+    0,                                        /* tp_iternext */
+    0,                                        /* tp_methods */
+    0,                                        /* tp_members */
+    0,                                        /* tp_getset */
+    0,                                        /* tp_base */
+    0,                                        /* tp_dict */
+    0,                                        /* tp_descr_get */
+    0,                                        /* tp_descr_set */
+    0,                                        /* tp_dictoffset */
+    0,                                        /* tp_init */
+    0,                                        /* tp_alloc */
+    bpy_app_handlers_persistent_new,          /* tp_new */
+    0,                                        /* tp_free */
 };
 
 static PyObject *py_cb_array[BKE_CB_EVT_TOT] = {NULL};



More information about the Bf-blender-cvs mailing list