Module: kamailio
Branch: master
Commit: 9d3c0d0d424c0bf8395465d7a6e14e89611aad0d
URL:
https://github.com/kamailio/kamailio/commit/9d3c0d0d424c0bf8395465d7a6e14e8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-01-13T12:35:21+01:00
app_python3s: proper check of PY_VERSION_HEX for python 3.11
---
Modified: src/modules/app_python3s/apy3s_kemi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9d3c0d0d424c0bf8395465d7a6e14e8…
Patch:
https://github.com/kamailio/kamailio/commit/9d3c0d0d424c0bf8395465d7a6e14e8…
---
diff --git a/src/modules/app_python3s/apy3s_kemi.c
b/src/modules/app_python3s/apy3s_kemi.c
index 7003a9f17b..64cbab618c 100644
--- a/src/modules/app_python3s/apy3s_kemi.c
+++ b/src/modules/app_python3s/apy3s_kemi.c
@@ -448,7 +448,7 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int
idx)
PyObject *ret = NULL;
PyThreadState *pstate = NULL;
PyFrameObject *pframe = NULL;
-#if PY_VERSION_HEX >= 0x03100000
+#if PY_VERSION_HEX >= 0x030B0000
PyCodeObject *pcode = NULL;
#endif
struct timeval tvb = {0}, tve = {0};
@@ -474,7 +474,7 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int
idx)
if(tdiff >= cfg_get(core, core_cfg, latency_limit_action)) {
pstate = PyThreadState_GET();
if (pstate != NULL) {
-#if PY_VERSION_HEX >= 0x03100000
+#if PY_VERSION_HEX >= 0x030B0000
pframe = PyThreadState_GetFrame(pstate);
if(pframe != NULL) {
pcode = PyFrame_GetCode(pframe);
@@ -484,7 +484,7 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int
idx)
#endif
}
-#if PY_VERSION_HEX >= 0x03100000
+#if PY_VERSION_HEX >= 0x030B0000
LOG(cfg_get(core, core_cfg, latency_log),
"alert - action KSR.%s%s%s(...)"
" took too long [%u us] (file:%s func:%s line:%d)\n",