Files
telephony/net/freeswitch/patches/uClibc/src-mod-languages-mod_python-freeswitch_python_cpp.patch
Mazi Lo 1ee1586053 [FreeSWITCH]: Ref. to FS git commit bb258288801b50e8fb673a620a6c2b4855e11daf
1. Update to FS v1.7.0
 2. Fix erlang detection
 3. Fix mod-python
 4. Add libvpx and libyuv configure switches.
 5. Add mod-graylog2, mod-png, mod-prefix, and mod-translate.
 6. Use $(STAGING_DIR)/host instead of $(STAGING_DIR_HOST).

--
Signed-off-by: Mazi Lo <openwrt.mazilo@recursor.net>
2016-03-26 17:49:30 -04:00

16 lines
461 B
Diff

--- a/src/mod/languages/mod_python/freeswitch_python.cpp
+++ b/src/mod/languages/mod_python/freeswitch_python.cpp
@@ -319,7 +319,12 @@ switch_status_t Session::run_dtmf_callba
}
if ((pyresult = PyEval_CallObject(cb_function, arglist))) {
+#if PY_MAJOR_VERSION < 3
str = (char *) PyString_AsString(pyresult);
+#else
+ //str = (char *) pyresult->encode('UTF-8');
+ str = (char *) PyUnicode_AsUnicode(pyresult);
+#endif
} else {
PyErr_Print();
}