Slightly cleaner way to fix #1543

This commit is contained in:
Alexey Sokolov
2018-06-02 10:45:03 +01:00
parent 94c5707f2e
commit 8eebdf750d

View File

@@ -7,6 +7,7 @@
Remove unrelated stuff from top of file which is included by default
s/std::string/CString/g
s/std_string/CString/g
Add "%traits_ptypen(CString);"
*/
//
@@ -17,6 +18,7 @@
%feature("naturalvar") CString;
class CString;
%traits_ptypen(CString);
/*@SWIG:/swig/3.0.8/typemaps/CStrings.swg,70,%typemaps_CString@*/
@@ -80,15 +82,6 @@ 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@*/