[sr-dev] git:5.2:c19ab2e8: app_python3: use PyBytes_AS_STRING() instead of PyString_AsString()
Daniel-Constantin Mierla
miconda at gmail.com
Fri May 3 10:31:43 CEST 2019
Module: kamailio
Branch: 5.2
Commit: c19ab2e81ed68379b58df60005f954fe8112ceba
URL: https://github.com/kamailio/kamailio/commit/c19ab2e81ed68379b58df60005f954fe8112ceba
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-05-03T10:30:56+02:00
app_python3: use PyBytes_AS_STRING() instead of PyString_AsString()
- PyString_AsString() is no longer in Python3 API
(cherry picked from commit 48bb059d8ff9b009d3c8afda83e0c964ab604d5a)
---
Modified: src/modules/app_python3/apy_kemi.c
---
Diff: https://github.com/kamailio/kamailio/commit/c19ab2e81ed68379b58df60005f954fe8112ceba.diff
Patch: https://github.com/kamailio/kamailio/commit/c19ab2e81ed68379b58df60005f954fe8112ceba.patch
---
diff --git a/src/modules/app_python3/apy_kemi.c b/src/modules/app_python3/apy_kemi.c
index 78e5194914..15820cafd0 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);
}
}
More information about the sr-dev
mailing list