From: <cg...@us...> - 2006-12-03 22:23:59
|
Revision: 3005 http://svn.sourceforge.net/jython/?rev=3005&view=rev Author: cgroves Date: 2006-12-03 14:23:58 -0800 (Sun, 03 Dec 2006) Log Message: ----------- make mro an instance method of a type, not a classmethod Modified Paths: -------------- trunk/jython/src/org/python/core/PyType.java trunk/jython/src/templates/type.expose Modified: trunk/jython/src/org/python/core/PyType.java =================================================================== --- trunk/jython/src/org/python/core/PyType.java 2006-12-03 22:23:26 UTC (rev 3004) +++ trunk/jython/src/org/python/core/PyType.java 2006-12-03 22:23:58 UTC (rev 3005) @@ -62,7 +62,7 @@ } } - dict.__setitem__("mro",new PyClassMethod(new PyMethodDescr("mro",PyType.class,0,1,new exposed_mro(null,null)))); + dict.__setitem__("mro",new PyMethodDescr("mro",PyType.class,0,1,new exposed_mro(null,null))); class exposed___getattribute__ extends PyBuiltinFunctionNarrow { private PyType self; @@ -726,8 +726,8 @@ if(metatype.underlying_class != PyType.class && metatype.lookup("mro") != null) { newtype.mro = Py.make_array(metatype.lookup("mro") - .__get__(newtype, metatype) - .__call__()); + .__get__(null, metatype) + .__call__(newtype)); } // __dict__ descriptor Modified: trunk/jython/src/templates/type.expose =================================================================== --- trunk/jython/src/templates/type.expose 2006-12-03 22:23:26 UTC (rev 3004) +++ trunk/jython/src/templates/type.expose 2006-12-03 22:23:58 UTC (rev 3005) @@ -7,9 +7,8 @@ expose_getset: __base__ getBase expose_getset: __bases__ getBases expose_getset: __mro__ getMro -# classmethods -expose_cmeth: :o mro o? # exposed methods +expose_meth: :o mro o? expose_meth: __getattribute__ n{attribute name} String name = `arg0; PyObject ret = self.type___findattr__(name); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |