Module: kamailio
Branch: master
Commit: 48bb059d8ff9b009d3c8afda83e0c964ab604d5a
URL:
https://github.com/kamailio/kamailio/commit/48bb059d8ff9b009d3c8afda83e0c96…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-05-03T10:28:18+02:00
app_python3: use PyBytes_AS_STRING() instead of PyString_AsString()
- PyString_AsString() is no longer in Python3 API
---
Modified: src/modules/app_python3/apy_kemi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/48bb059d8ff9b009d3c8afda83e0c96…
Patch:
https://github.com/kamailio/kamailio/commit/48bb059d8ff9b009d3c8afda83e0c96…
---
diff --git a/src/modules/app_python3/apy_kemi.c b/src/modules/app_python3/apy_kemi.c
index b01ac53890..7a93e7ca98 100755
--- a/src/modules/app_python3/apy_kemi.c
+++ b/src/modules/app_python3/apy_kemi.c
@@ -777,8 +777,8 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int
idx)
" took too long [%u ms] (file:%s func:%s line:%d)\n",
(ket->mname.len>0)?ket->mname.s:"",
(ket->mname.len>0)?".":"", ket->fname.s, tdiff,
- (pframe)?PyString_AsString(pframe->f_code->co_filename):"",
- (pframe)?PyString_AsString(pframe->f_code->co_name):"",
+ (pframe)?PyBytes_AS_STRING(pframe->f_code->co_filename):"",
+ (pframe)?PyBytes_AS_STRING(pframe->f_code->co_name):"",
(pframe)?PyCode_Addr2Line(pframe->f_code, pframe->f_lasti):0);
}
}