From: <cg...@us...> - 2006-11-26 21:42:53
|
Revision: 2991 http://svn.sourceforge.net/jython/?rev=2991&view=rev Author: cgroves Date: 2006-11-26 13:42:52 -0800 (Sun, 26 Nov 2006) Log Message: ----------- if obj comes through to the descriptor's get, use it as the class to bind the method Modified Paths: -------------- trunk/jython/src/org/python/core/PyClassMethod.java Modified: trunk/jython/src/org/python/core/PyClassMethod.java =================================================================== --- trunk/jython/src/org/python/core/PyClassMethod.java 2006-11-26 21:34:30 UTC (rev 2990) +++ trunk/jython/src/org/python/core/PyClassMethod.java 2006-11-26 21:42:52 UTC (rev 2991) @@ -66,7 +66,7 @@ } public PyObject __get__(PyObject obj) { - return classmethod___get__(obj, null); + return classmethod___get__(obj, null); } public PyObject __get__(PyObject obj, PyObject type) { @@ -74,13 +74,14 @@ } final PyObject classmethod___get__(PyObject obj) { - return classmethod___get__(obj, null); + return classmethod___get__(obj, null); } final PyObject classmethod___get__(PyObject obj, PyObject type) { - if (type == null) - type = obj.getType(); - return new PyMethod(type, callable, type.getType()); + if(obj == null) { + return new PyMethod(type, callable, type); + } + return new PyMethod(obj, callable, type); } final static PyObject classmethod_new(PyNewWrapper new_, boolean init, PyType subtype, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |