diff options
Diffstat (limited to 'source/blender/python/intern/bpy_app_handlers.c')
-rw-r--r-- | source/blender/python/intern/bpy_app_handlers.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index cf90443e212..5b8c20bb12d 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -110,7 +110,13 @@ static PyObject *bpy_app_handlers_persistent_new(PyTypeObject *UNUSED(type), PyO /* dummy type because decorators can't be PyCFunctions */ static PyTypeObject BPyPersistent_Type = { + +#if defined(_MSC_VER) || defined(FREE_WINDOWS) + PyVarObject_HEAD_INIT(NULL, 0) +#else PyVarObject_HEAD_INIT(&PyType_Type, 0) +#endif + "persistent", /* tp_name */ 0, /* tp_basicsize */ 0, /* tp_itemsize */ @@ -185,6 +191,10 @@ PyObject *BPY_app_handlers_struct(void) { PyObject *ret; +#if defined(_MSC_VER) || defined(FREE_WINDOWS) + BPyPersistent_Type.ob_base.ob_base.ob_type= &PyType_Type; +#endif + if (PyType_Ready(&BPyPersistent_Type) < 0) { BLI_assert(!"error initializing 'bpy.app.handlers.persistent'"); } |