From: <pj...@us...> - 2008-09-24 19:56:32
|
Revision: 5344 http://jython.svn.sourceforge.net/jython/?rev=5344&view=rev Author: pjenvey Date: 2008-09-24 19:56:28 +0000 (Wed, 24 Sep 2008) Log Message: ----------- revert r5343, it's broken Modified Paths: -------------- trunk/jython/src/org/python/core/PyFile.java trunk/jython/src/org/python/core/StdoutWrapper.java Modified: trunk/jython/src/org/python/core/PyFile.java =================================================================== --- trunk/jython/src/org/python/core/PyFile.java 2008-09-24 19:44:25 UTC (rev 5343) +++ trunk/jython/src/org/python/core/PyFile.java 2008-09-24 19:56:28 UTC (rev 5344) @@ -411,10 +411,6 @@ } } - public void write(PyObject o) { - file_write(o); - } - final synchronized void file_write(String s) { checkClosed(); softspace = false; Modified: trunk/jython/src/org/python/core/StdoutWrapper.java =================================================================== --- trunk/jython/src/org/python/core/StdoutWrapper.java 2008-09-24 19:44:25 UTC (rev 5343) +++ trunk/jython/src/org/python/core/StdoutWrapper.java 2008-09-24 19:56:28 UTC (rev 5344) @@ -105,10 +105,11 @@ file.write(" "); file.softspace = false; } - file.write(o); + PyString string = o.__str__(); + String s = string.toString(); + int len = s.length(); + file.write(s); if (o instanceof PyString) { - String s = o.toString(); - int len = s.length(); if (len == 0 || !Character.isWhitespace(s.charAt(len - 1)) || s.charAt(len - 1) == ' ') { file.softspace = space; @@ -127,10 +128,11 @@ obj.invoke("write", Py.Space); obj.__setattr__("softspace", Py.Zero); } - obj.invoke("write", o); + PyString string = o.__str__(); + String s = o.toString(); + int len = s.length(); + obj.invoke("write", string); if (o instanceof PyString) { - String s = o.toString(); - int len = s.length(); if (len == 0 || !Character.isWhitespace(s.charAt(len - 1)) || s.charAt(len - 1) == ' ') { obj.__setattr__("softspace", space ? Py.One : Py.Zero); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |