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};
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);
#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 ms] (file:%s func:%s line:%d)\n",