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:
parent
d56b75b1ac
commit
80120955e4
1 changed files with 16 additions and 8 deletions
|
|
@ -1510,16 +1510,24 @@ 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) {
|
||||||
SwigType *typetm = Getattr(tm,k_type);
|
String *tmninp = NewStringf("tmap:%s:numinputs",kwmatch);
|
||||||
SwigType *typein = Getattr(tmin,k_type);
|
String *ninp = Getattr(p,tmninp);
|
||||||
if (!typein) {
|
Delete(tmninp);
|
||||||
String *temp = NewStringf("tmap:%s:match_type",kwmatch);
|
if (ninp && Equal(ninp, "0")) {
|
||||||
typein = Getattr(p,temp);
|
|
||||||
Delete(temp);
|
|
||||||
}
|
|
||||||
if (!Equal(typein,typetm)) {
|
|
||||||
p = nextSibling(p);
|
p = nextSibling(p);
|
||||||
continue;
|
continue;
|
||||||
|
} else {
|
||||||
|
SwigType *typetm = Getattr(tm,k_type);
|
||||||
|
SwigType *typein = Getattr(tmin,k_type);
|
||||||
|
if (!typein) {
|
||||||
|
String *temp = NewStringf("tmap:%s:match_type",kwmatch);
|
||||||
|
typein = Getattr(p,temp);
|
||||||
|
Delete(temp);
|
||||||
|
}
|
||||||
|
if (!Equal(typein,typetm)) {
|
||||||
|
p = nextSibling(p);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
p = nextSibling(p);
|
p = nextSibling(p);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue