Hello! At ZNC we have an own string class CString, which is inherited from std::string. The goal is to use it as a just string in target languages.
How to do that properly? When I was writing modperl and modpython ZNC modules, I used an approach described at http://old.nabble.com/Forward-declaration-error--td24064356.html Used "swig -E" on std_string.i, got a long file as a result, cleaned it up and changed all occurences of std::string to CString. It worked fine before SWIG 2.0.5, but in 2.0.5 it started to give errors while generating sources for modpython: /usr/share/swig/2.0.6/std/std_pair.i:31: Error: Can't copy typemap (directorout) std::pair< CString,CString > = std::pair< CString,CString > &DIRECTOROUT /usr/share/swig/2.0.6/std/std_pair.i:31: Error: Can't copy typemap (in) std::pair< CString,CString > *INPUT = std::pair< CString,CString > *INOUT /usr/share/swig/2.0.6/std/std_pair.i:31: Error: Can't copy typemap (in) std::pair< CString,CString > &INPUT = std::pair< CString,CString > &INOUT /usr/share/swig/2.0.6/std/std_pair.i:31: Error: Can't copy typemap (typecheck) std::pair< CString,CString > *INPUT = std::pair< CString,CString > *INOUT /usr/share/swig/2.0.6/std/std_pair.i:31: Error: Can't copy typemap (typecheck) std::pair< CString,CString > &INPUT = std::pair< CString,CString > &INOUT /usr/share/swig/2.0.6/std/std_pair.i:31: Error: Can't copy typemap (argout) std::pair< CString,CString > *OUTPUT = std::pair< CString,CString > *INOUT /usr/share/swig/2.0.6/std/std_pair.i:31: Error: Can't copy typemap (argout) std::pair< CString,CString > &OUTPUT = std::pair< CString,CString > &INOUT /usr/share/swig/2.0.6/std/std_pair.i:31: Error: Can't copy typemap (typecheck) std::pair< CString,CString > *INPUT = std::pair< CString,CString > *INOUT /usr/share/swig/2.0.6/std/std_pair.i:31: Error: Can't copy typemap (typecheck) std::pair< CString,CString > &INPUT = std::pair< CString,CString > &INOUT /usr/share/swig/2.0.6/std/std_pair.i:31: Error: Can't copy typemap (freearg) std::pair< CString,CString > *INPUT = std::pair< CString,CString > *INOUT /usr/share/swig/2.0.6/std/std_pair.i:31: Error: Can't copy typemap (freearg) std::pair< CString,CString > &INPUT = std::pair< CString,CString > &INOUT Sending copy of the letter to 672...@bugs.debian.org Also there is related issue #174 on github/znc. -- Best regards, Alexey "DarthGandalf" Sokolov
signature.asc
Description: OpenPGP digital signature