From: Marcelo M. <mar...@us...> - 2006-01-15 18:01:24
|
Update of /cvsroot/swig/SWIG/Source/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3805/Source/Modules Modified Files: python.cxx ruby.cxx Log Message: allow to apply freearg ven when no in typemap is in place when numimputs=0 Index: ruby.cxx =================================================================== RCS file: /cvsroot/swig/SWIG/Source/Modules/ruby.cxx,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** ruby.cxx 15 Jan 2006 00:23:51 -0000 1.112 --- ruby.cxx 15 Jan 2006 18:01:11 -0000 1.113 *************** *** 915,919 **** String *tm; for (Parm *p = l; p; ) { ! if (!checkAttribute(p,"tmap:in:numinputs","0") && (tm = Getattr(p,"tmap:freearg"))) { if (Len(tm) != 0) { Replaceall(tm,"$source",Getattr(p,"lname")); --- 915,920 ---- String *tm; for (Parm *p = l; p; ) { ! // if (!checkAttribute(p,"tmap:in:numinputs","0") && (tm = Getattr(p,"tmap:freearg"))) { ! if ((tm = Getattr(p,"tmap:freearg"))) { if (Len(tm) != 0) { Replaceall(tm,"$source",Getattr(p,"lname")); Index: python.cxx =================================================================== RCS file: /cvsroot/swig/SWIG/Source/Modules/python.cxx,v retrieving revision 1.172 retrieving revision 1.173 diff -C2 -d -r1.172 -r1.173 *** python.cxx 8 Jan 2006 06:58:49 -0000 1.172 --- python.cxx 15 Jan 2006 18:01:08 -0000 1.173 *************** *** 1745,1749 **** /* Insert cleanup code */ for (p = l; p;) { ! if (!checkAttribute(p,"tmap:in:numinputs","0") && !Getattr(p,"tmap:in:parse")) { tm = Getattr(p,"tmap:freearg"); if (Getattr(p,"tmap:freearg:implicitconv")) { --- 1745,1750 ---- /* Insert cleanup code */ for (p = l; p;) { ! // 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")) { *************** *** 1753,1760 **** convflag = get_implicitconv_flag(classLookup(ptype)); } ! tm = (strcmp(convflag,"0") != 0) ? Getattr(p,"tmap:freearg") : 0; ! } else { ! tm = Getattr(p,"tmap:freearg"); ! } if (tm && (Len(tm) != 0)) { Replaceall(tm,"$source",Getattr(p,"lname")); --- 1754,1759 ---- convflag = get_implicitconv_flag(classLookup(ptype)); } ! tm = (strcmp(convflag,"0") != 0) ? tm : 0; ! } if (tm && (Len(tm) != 0)) { Replaceall(tm,"$source",Getattr(p,"lname")); |