Fixes to default typemap handling of arrays.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4833 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2003-05-29 18:28:46 +00:00
commit fcc42fa5a6

View file

@ -577,9 +577,9 @@ Swig_typemap_search(const String_or_char *op, SwigType *type, String_or_char *na
} }
/* Hmmm. Well, no match seems to be found at all. See if there is some kind of default mapping */ /* Hmmm. Well, no match seems to be found at all. See if there is some kind of default mapping */
if (!primitive) {
primitive = SwigType_default(type); primitive = SwigType_default(type);
} while (primitive) {
tm = Getattr(typemaps[ts],primitive); tm = Getattr(typemaps[ts],primitive);
if (tm && cname) { if (tm && cname) {
tm1 = Getattr(tm,cname); tm1 = Getattr(tm,cname);
@ -592,6 +592,12 @@ Swig_typemap_search(const String_or_char *op, SwigType *type, String_or_char *na
result = Getattr(tm,tmop); result = Getattr(tm,tmop);
if (result) goto ret_result; if (result) goto ret_result;
} }
{
SwigType *nprim = SwigType_default(primitive);
Delete(primitive);
primitive = nprim;
}
}
if (ctype != type) { Delete(ctype); ctype = 0; } if (ctype != type) { Delete(ctype); ctype = 0; }
ts--; /* Hmmm. Nothing found in this scope. Guess we'll go try another scope */ ts--; /* Hmmm. Nothing found in this scope. Guess we'll go try another scope */
} }