From: <pj...@us...> - 2009-05-04 06:34:59
|
Revision: 6292 http://jython.svn.sourceforge.net/jython/?rev=6292&view=rev Author: pjenvey Date: 2009-05-04 06:34:46 +0000 (Mon, 04 May 2009) Log Message: ----------- we can safely shortcut _cmp on identity match Modified Paths: -------------- trunk/jython/src/org/python/core/PyObject.java Modified: trunk/jython/src/org/python/core/PyObject.java =================================================================== --- trunk/jython/src/org/python/core/PyObject.java 2009-05-04 06:07:19 UTC (rev 6291) +++ trunk/jython/src/org/python/core/PyObject.java 2009-05-04 06:34:46 UTC (rev 6292) @@ -1252,6 +1252,10 @@ * @return -1 if this < 0; 0 if this == o; +1 if this > o **/ public final int _cmp(PyObject o) { + if (this == o) { + return 0; + } + PyObject token = null; ThreadState ts = Py.getThreadState(); try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |