Fix VCString return values in modpython

The list of functions which returned list of unknown objects instead of
list of strings:
* CMessage::GetParams()
* CZNC::GetMotd()
* CZNC::GetTrustedProxies()
* CZNC::GetBindHosts()
This commit is contained in:
Alexey Sokolov
2018-06-02 01:02:40 +01:00
parent e531fe870a
commit 11fb428878

View File

@@ -74,12 +74,21 @@ SWIG_AsVal_CString (PyObject * obj, CString *val)
}
/*@SWIG@*/
/*@SWIG:/swig/3.0.8/typemaps/CStrings.swg,38,%CString_from@*/
%fragment("SWIG_" "From" "_" {CString},"header",fragment="SWIG_FromCharPtrAndSize") {
%fragment("SWIG_" "From" "_" {CString},"header",fragment="SWIG_FromCharPtrAndSize", fragment="StdTraits") {
SWIGINTERNINLINE PyObject *
SWIG_From_CString (const CString& s)
{
return SWIG_FromCharPtrAndSize(s.data(), s.size());
}
namespace swig {
template<>
struct traits_from<CString> {
static PyObject* from(const CString& s) {
return SWIG_From_CString(s);
}
};
}
}
/*@SWIG@*/