fix 'freearg' applied to 'in' when numinputs=0

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8500 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-21 08:03:31 +00:00
commit 80120955e4

View file

@ -1510,6 +1510,13 @@ Swig_typemap_attach_parms(const String_or_char *op, ParmList *parms, Wrapper *f)
if (tm) Printf(stdout,"matching: %s\n", kwmatch); if (tm) Printf(stdout,"matching: %s\n", kwmatch);
#endif #endif
if (tmin) { if (tmin) {
String *tmninp = NewStringf("tmap:%s:numinputs",kwmatch);
String *ninp = Getattr(p,tmninp);
Delete(tmninp);
if (ninp && Equal(ninp, "0")) {
p = nextSibling(p);
continue;
} else {
SwigType *typetm = Getattr(tm,k_type); SwigType *typetm = Getattr(tm,k_type);
SwigType *typein = Getattr(tmin,k_type); SwigType *typein = Getattr(tmin,k_type);
if (!typein) { if (!typein) {
@ -1521,6 +1528,7 @@ Swig_typemap_attach_parms(const String_or_char *op, ParmList *parms, Wrapper *f)
p = nextSibling(p); p = nextSibling(p);
continue; continue;
} }
}
} else { } else {
p = nextSibling(p); p = nextSibling(p);
continue; continue;