From: Finn B. <bc...@us...> - 2001-03-22 20:02:56
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv21728 Modified Files: PyClass.java Log Message: Fix for #406193 and #231507. Only copy the proxy methods that is listed in the new special __supername__ attribute. Index: PyClass.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyClass.java,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -r2.22 -r2.23 *** PyClass.java 2001/03/04 18:08:02 2.22 --- PyClass.java 2001/03/22 20:02:49 2.23 *************** *** 131,143 **** PyJavaClass.lookup(proxyClass).__findattr__("__dict__"); // This code will add in the needed super__ methods to the class ! if (superDict instanceof PyStringMap && ! dict instanceof PyStringMap) ! { ! PyStringMap superMap = ((PyStringMap)superDict).copy(); ! superMap.update((PyStringMap)dict); ! dict = superMap; ! __dict__ = dict; } } //System.out.println("proxyClasses: "+proxyClasses+", "+ // proxyClasses[0]); --- 131,144 ---- PyJavaClass.lookup(proxyClass).__findattr__("__dict__"); // This code will add in the needed super__ methods to the class ! PyObject snames = superDict.__finditem__("__supernames__"); ! if (snames != null) { ! PyObject sname; ! for (int i = 0; (sname = snames.__finditem__(i)) != null; i++) { ! if (__dict__.__finditem__(sname) == null) ! __dict__.__setitem__(sname, superDict.__getitem__(sname)); ! } } } + //System.out.println("proxyClasses: "+proxyClasses+", "+ // proxyClasses[0]); |