summaryrefslogtreecommitdiff
path: root/pjsip-apps/src/python/_pjsua.c
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip-apps/src/python/_pjsua.c')
-rw-r--r--pjsip-apps/src/python/_pjsua.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pjsip-apps/src/python/_pjsua.c b/pjsip-apps/src/python/_pjsua.c
index 0966d90e..502905a4 100644
--- a/pjsip-apps/src/python/_pjsua.c
+++ b/pjsip-apps/src/python/_pjsua.c
@@ -188,7 +188,7 @@ static void cb_on_dtmf_digit(pjsua_call_id call_id, int digit)
if (PyCallable_Check(g_obj_callback->on_dtmf_digit)) {
char digit_str[10];
- ENTER_PYTHON();
+ PyGILState_STATE state = PyGILState_Ensure();
pj_ansi_snprintf(digit_str, sizeof(digit_str), "%c", digit);
@@ -200,7 +200,7 @@ static void cb_on_dtmf_digit(pjsua_call_id call_id, int digit)
NULL
);
- LEAVE_PYTHON();
+ PyGILState_Release(state);
}
}