Allow returning std::strings with embedded null characters (why one would want to do this is beyond my understanding)

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4337 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Luigi Ballabio 2003-02-18 17:13:13 +00:00
commit dc309054dd
2 changed files with 3 additions and 3 deletions

View file

@ -44,11 +44,11 @@ namespace std {
}
%typemap(out) string {
$result = PyString_FromString($1.c_str());
$result = PyString_FromStringAndSize($1.data(),$1.size());
}
%typemap(out) const string & {
$result = PyString_FromString($1->c_str());
$result = PyString_FromStringAndSize($1->data(),$1->size());
}
}