[FreeSWITCH]: Ref. to FS git commit bb258288801b50e8fb673a620a6c2b4855e11daf
[feed/telephony.git] / net / freeswitch / patches / uClibc / src-mod-languages-mod_python-freeswitch_python_cpp.patch
1 --- a/src/mod/languages/mod_python/freeswitch_python.cpp
2 +++ b/src/mod/languages/mod_python/freeswitch_python.cpp
3 @@ -319,7 +319,12 @@ switch_status_t Session::run_dtmf_callba
4 }
5
6 if ((pyresult = PyEval_CallObject(cb_function, arglist))) {
7 +#if PY_MAJOR_VERSION < 3
8 str = (char *) PyString_AsString(pyresult);
9 +#else
10 + //str = (char *) pyresult->encode('UTF-8');
11 + str = (char *) PyUnicode_AsUnicode(pyresult);
12 +#endif
13 } else {
14 PyErr_Print();
15 }