diff options
author | Olly Betts <olly@survex.com> | 2011-02-18 08:44:44 +0000 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2011-02-18 08:44:44 +0000 |
commit | 049e51c2822e8b10834dca51f90483949b3a8101 (patch) | |
tree | 2abc93b3deea5ff7ea527bf2dc24154d82054564 /Lib/typemaps/std_strings.swg | |
parent | bf7c9e9a423a83fea22afa9480631d295045321c (diff) | |
download | swig-049e51c2822e8b10834dca51f90483949b3a8101.tar.gz |
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
Diffstat (limited to 'Lib/typemaps/std_strings.swg')
-rw-r--r-- | Lib/typemaps/std_strings.swg | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/typemaps/std_strings.swg b/Lib/typemaps/std_strings.swg index b7e8f6d52..e9c23ba91 100644 --- a/Lib/typemaps/std_strings.swg +++ b/Lib/typemaps/std_strings.swg @@ -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 |