mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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:
@@ -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@*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user