From: William F. <wsf...@us...> - 2004-10-06 21:09:48
|
Update of /cvsroot/swig/SWIG/Source/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11546 Modified Files: python.cxx Log Message: fixes for the new default argument wrapping in director constructors and virtual methods Index: python.cxx =================================================================== RCS file: /cvsroot/swig/SWIG/Source/Modules/python.cxx,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** python.cxx 5 Oct 2004 21:06:55 -0000 1.55 --- python.cxx 6 Oct 2004 21:09:36 -0000 1.56 *************** *** 1994,1999 **** /* emit the director method */ if (status == SWIG_OK) { ! Wrapper_print(w, f_directors); ! Printv(f_directors_h, declaration, NIL); } --- 1994,2001 ---- /* emit the director method */ if (status == SWIG_OK) { ! if (!Getattr(n,"defaultargs")) { ! Wrapper_print(w, f_directors); ! Printv(f_directors_h, declaration, NIL); ! } } *************** *** 2039,2061 **** set_nextSibling(ip, p); ! /* constructor */ ! { ! Wrapper *w = NewWrapper(); ! String *call; ! String *basetype = Getattr(parent, "classtype"); ! String *target = Swig_method_decl(decl, classname, parms, 0, 0); ! call = Swig_csuperclass_call(0, basetype, superparms); ! Printf(w->def, "%s::%s: %s, Swig::Director(self, disown) { }", classname, target, call); ! Delete(target); ! Wrapper_print(w, f_directors); ! Delete(call); ! DelWrapper(w); ! } ! ! /* constructor header */ ! { ! String *target = Swig_method_decl(decl, classname, parms, 0, 1); ! Printf(f_directors_h, " %s;\n", target); ! Delete(target); } --- 2041,2065 ---- set_nextSibling(ip, p); ! if (!Getattr(n,"defaultargs")) { ! /* constructor */ ! { ! Wrapper *w = NewWrapper(); ! String *call; ! String *basetype = Getattr(parent, "classtype"); ! String *target = Swig_method_decl(decl, classname, parms, 0, 0); ! call = Swig_csuperclass_call(0, basetype, superparms); ! Printf(w->def, "%s::%s: %s, Swig::Director(self, disown) { }", classname, target, call); ! Delete(target); ! Wrapper_print(w, f_directors); ! Delete(call); ! DelWrapper(w); ! } ! ! /* constructor header */ ! { ! String *target = Swig_method_decl(decl, classname, parms, 0, 1); ! Printf(f_directors_h, " %s;\n", target); ! Delete(target); ! } } |