Remove pointless special casing of zero-length strings, remnant of a series
of changes Marcelo made here. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12472 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bf7c9e9a42
commit
049e51c282
1 changed files with 1 additions and 5 deletions
|
|
@ -40,11 +40,7 @@ SWIG_AsPtr_dec(String)(SWIG_Object obj, String **val)
|
|||
SWIGINTERNINLINE SWIG_Object
|
||||
SWIG_From_dec(String)(const String& s)
|
||||
{
|
||||
if (s.size()) {
|
||||
return SWIG_FromCharPtrAndSize(s.data(), s.size());
|
||||
} else {
|
||||
return SWIG_FromCharPtrAndSize(s.c_str(), 0);
|
||||
}
|
||||
return SWIG_FromCharPtrAndSize(s.data(), s.size());
|
||||
}
|
||||
}
|
||||
%enddef
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue