allow to apply freearg ven when no in typemap is in place when numimputs=0

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8461 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-15 18:01:11 +00:00
commit e1d78b0dec
2 changed files with 6 additions and 6 deletions

View file

@ -1744,7 +1744,8 @@ public:
/* Insert cleanup code */
for (p = l; p;) {
if (!checkAttribute(p,"tmap:in:numinputs","0") && !Getattr(p,"tmap:in:parse")) {
// if (!checkAttribute(p,"tmap:in:numinputs","0") && !Getattr(p,"tmap:in:parse")) {
if (!Getattr(p,"tmap:in:parse")) {
tm = Getattr(p,"tmap:freearg");
if (Getattr(p,"tmap:freearg:implicitconv")) {
const char *convflag = "0";
@ -1752,10 +1753,8 @@ public:
SwigType *ptype = Getattr(p,"type");
convflag = get_implicitconv_flag(classLookup(ptype));
}
tm = (strcmp(convflag,"0") != 0) ? Getattr(p,"tmap:freearg") : 0;
} else {
tm = Getattr(p,"tmap:freearg");
}
tm = (strcmp(convflag,"0") != 0) ? tm : 0;
}
if (tm && (Len(tm) != 0)) {
Replaceall(tm,"$source",Getattr(p,"lname"));
Printv(cleanup,tm,"\n",NIL);