summaryrefslogtreecommitdiff
path: root/Lib/typemaps/std_strings.swg
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2011-02-18 08:44:44 +0000
committerOlly Betts <olly@survex.com>2011-02-18 08:44:44 +0000
commit049e51c2822e8b10834dca51f90483949b3a8101 (patch)
tree2abc93b3deea5ff7ea527bf2dc24154d82054564 /Lib/typemaps/std_strings.swg
parentbf7c9e9a423a83fea22afa9480631d295045321c (diff)
downloadswig-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.swg6
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