minor tidy up

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11805 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-01-08 08:09:41 +00:00
commit eb2e4a59d0

View file

@ -662,11 +662,9 @@ static Hash *typemap_search(const_String_or_char_ptr tmap_method, SwigType *type
ts = tm_scope; ts = tm_scope;
if (debug_display) { if (debug_display) {
String *empty_string = NewStringEmpty(); String *typestr = SwigType_str(type, cqualifiedname ? cqualifiedname : cname);
String *typestr = SwigType_str(type, cqualifiedname ? cqualifiedname : (cname ? cname : empty_string));
Swig_diagnostic(Getfile(node), Getline(node), "Searching for a suitable '%s' typemap for: %s\n", tmap_method, typestr); Swig_diagnostic(Getfile(node), Getline(node), "Searching for a suitable '%s' typemap for: %s\n", tmap_method, typestr);
Delete(typestr); Delete(typestr);
Delete(empty_string);
} }
while (ts >= 0) { while (ts >= 0) {
ctype = type; ctype = type;
@ -824,15 +822,12 @@ static Hash *typemap_search(const_String_or_char_ptr tmap_method, SwigType *type
result = backup; result = backup;
ret_result: ret_result:
if (noarrays) Delete(noarrays);
Delete(noarrays); Delete(primitive);
if (primitive)
Delete(primitive);
if ((unstripped) && (unstripped != type)) if ((unstripped) && (unstripped != type))
Delete(unstripped); Delete(unstripped);
if (matchtype) { if (matchtype)
*matchtype = Copy(ctype); *matchtype = Copy(ctype);
}
if (type != ctype) if (type != ctype)
Delete(ctype); Delete(ctype);
return result; return result;