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:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-02-24 22:23:18 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-02-24 22:23:18 +0300
commit7a8a8241b930826a43ca2ddb37c531ba73b5317e (patch)
treeda4bfc2a0d46ca6fb48d9dcd94a69ebc246e23f7
parent201ab7c54025afc42570ce3df3d2bb7f37fe36be (diff)
Revert "t"
This reverts commit d3a96e5022e121426c8926d0507effe4e9b4005f.
-rw-r--r--source/blender/python/intern/bpy_rna_callback.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/source/blender/python/intern/bpy_rna_callback.c b/source/blender/python/intern/bpy_rna_callback.c
index 34c1b8e84d6..7f8ea54ab98 100644
--- a/source/blender/python/intern/bpy_rna_callback.c
+++ b/source/blender/python/intern/bpy_rna_callback.c
@@ -24,7 +24,6 @@
#include <Python.h>
#include "../generic/python_utildefines.h"
-#include "../generic/py_capi_utils.h"
#include "DNA_space_types.h"
@@ -496,40 +495,28 @@ PyObject *pyrna_callback_classmethod_remove(PyObject *UNUSED(self), PyObject *ar
static void cb_customdata_free(void *customdata)
{
PyObject *tuple = customdata;
-
- Py_DECREF(tuple);
-}
-
-void BPY_callback_screen_free(struct ARegionType *art)
-{
- bool use_gil = !PyC_IsInterpreterActive();
+ bool use_gil = true; /* !PyC_IsInterpreterActive(); */
PyGILState_STATE gilstate;
if (use_gil) {
gilstate = PyGILState_Ensure();
}
- ED_region_draw_cb_remove_by_type(art, cb_region_draw, cb_customdata_free);
+
+ Py_DECREF(tuple);
if (use_gil) {
PyGILState_Release(gilstate);
}
}
-void BPY_callback_wm_free(struct wmWindowManager *wm)
+void BPY_callback_screen_free(struct ARegionType *art)
{
- bool use_gil = !PyC_IsInterpreterActive();
-
- PyGILState_STATE gilstate;
- if (use_gil) {
- gilstate = PyGILState_Ensure();
- }
+ ED_region_draw_cb_remove_by_type(art, cb_region_draw, cb_customdata_free);
+}
- BLI_assert(PyC_IsInterpreterActive());
+void BPY_callback_wm_free(struct wmWindowManager *wm)
+{
WM_paint_cursor_remove_by_type(wm, cb_wm_cursor_draw, cb_customdata_free);
-
- if (use_gil) {
- PyGILState_Release(gilstate);
- }
}
/** \} */