mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 01:08:10 +02:00
Another place that was using python threading APIs
This commit is contained in:
@@ -20,11 +20,9 @@
|
|||||||
|
|
||||||
#define CALLBACK(name, fmt, ...) \
|
#define CALLBACK(name, fmt, ...) \
|
||||||
if ((name) != NULL) { \
|
if ((name) != NULL) { \
|
||||||
PyGILState_STATE _pystate = PyGILState_Ensure(); \
|
|
||||||
PyObject *_pyret = PyObject_CallFunction((name), fmt, __VA_ARGS__); \
|
PyObject *_pyret = PyObject_CallFunction((name), fmt, __VA_ARGS__); \
|
||||||
if (_pyret == NULL && PyErr_Occurred() != NULL) PyErr_Print(); \
|
if (_pyret == NULL && PyErr_Occurred() != NULL) PyErr_Print(); \
|
||||||
Py_CLEAR(_pyret); \
|
Py_CLEAR(_pyret); \
|
||||||
PyGILState_Release(_pystate); \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define WINDOW_CALLBACK(name, fmt, ...) \
|
#define WINDOW_CALLBACK(name, fmt, ...) \
|
||||||
|
|||||||
Reference in New Issue
Block a user