diff options
Diffstat (limited to 'gi/_gobject/pygobject-private.h')
-rw-r--r-- | gi/_gobject/pygobject-private.h | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/gi/_gobject/pygobject-private.h b/gi/_gobject/pygobject-private.h index 5de7488d..e2a0af74 100644 --- a/gi/_gobject/pygobject-private.h +++ b/gi/_gobject/pygobject-private.h @@ -21,39 +21,6 @@ /* from gobjectmodule.c */ extern struct _PyGObject_Functions pygobject_api_functions; -#define pyg_block_threads() G_STMT_START { \ - if (pygobject_api_functions.block_threads != NULL) \ - (* pygobject_api_functions.block_threads)(); \ - } G_STMT_END -#define pyg_unblock_threads() G_STMT_START { \ - if (pygobject_api_functions.unblock_threads != NULL) \ - (* pygobject_api_functions.unblock_threads)(); \ - } G_STMT_END - -#define pyg_threads_enabled (pygobject_api_functions.threads_enabled) - -#ifdef DISABLE_THREADING -#define pyg_gil_state_ensure() 0 -#define pyg_gil_state_release(state) G_STMT_START { \ - } G_STMT_END - -#else -#define pyg_gil_state_ensure() (pygobject_api_functions.threads_enabled? (PyGILState_Ensure()) : 0) -#define pyg_gil_state_release(state) G_STMT_START { \ - if (pygobject_api_functions.threads_enabled) \ - PyGILState_Release(state); \ - } G_STMT_END -#endif - -#define pyg_begin_allow_threads \ - G_STMT_START { \ - PyThreadState *_save = NULL; \ - if (pygobject_api_functions.threads_enabled) \ - _save = PyEval_SaveThread(); -#define pyg_end_allow_threads \ - if (pygobject_api_functions.threads_enabled) \ - PyEval_RestoreThread(_save); \ - } G_STMT_END #ifndef Py_CLEAR /* since Python 2.4 */ |