On 24/05/12 22:37, David Piepgrass wrote:
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 you use a string class derived from std::string, the main problem tends to 
be that SWIG's built-in typemaps refer to std::string explicitly, but that's 
unnecessary. For some target languages (at least C# and Java) if you simply 
make a copy of the typemap with std::string changed to $*1_ltype, then you can 
%apply those typemaps to your derived class.

Thanks for pointing this out. I've put these modifications into swig-2.0.7.

William




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to