From eb2e4a59d02a98be13aab1cb040c64cec8bb177d Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 8 Jan 2010 08:09:41 +0000 Subject: [PATCH] minor tidy up git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11805 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Swig/typemap.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Source/Swig/typemap.c b/Source/Swig/typemap.c index e27b44f24..86688b153 100644 --- a/Source/Swig/typemap.c +++ b/Source/Swig/typemap.c @@ -662,11 +662,9 @@ static Hash *typemap_search(const_String_or_char_ptr tmap_method, SwigType *type ts = tm_scope; if (debug_display) { - String *empty_string = NewStringEmpty(); - String *typestr = SwigType_str(type, cqualifiedname ? cqualifiedname : (cname ? cname : empty_string)); + String *typestr = SwigType_str(type, cqualifiedname ? cqualifiedname : cname); Swig_diagnostic(Getfile(node), Getline(node), "Searching for a suitable '%s' typemap for: %s\n", tmap_method, typestr); Delete(typestr); - Delete(empty_string); } while (ts >= 0) { ctype = type; @@ -824,15 +822,12 @@ static Hash *typemap_search(const_String_or_char_ptr tmap_method, SwigType *type result = backup; ret_result: - if (noarrays) - Delete(noarrays); - if (primitive) - Delete(primitive); + Delete(noarrays); + Delete(primitive); if ((unstripped) && (unstripped != type)) Delete(unstripped); - if (matchtype) { + if (matchtype) *matchtype = Copy(ctype); - } if (type != ctype) Delete(ctype); return result;