From: <cg...@us...> - 2008-10-19 23:30:41
|
Revision: 5473 http://jython.svn.sourceforge.net/jython/?rev=5473&view=rev Author: cgroves Date: 2008-10-19 23:30:32 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Replace StringUtil.asPyString with Py.newString Modified Paths: -------------- trunk/jython/Lib/javapath.py trunk/jython/Lib/os.py trunk/jython/Lib/socket.py trunk/jython/src/org/python/core/util/StringUtil.java Modified: trunk/jython/Lib/javapath.py =================================================================== --- trunk/jython/Lib/javapath.py 2008-10-19 23:18:22 UTC (rev 5472) +++ trunk/jython/Lib/javapath.py 2008-10-19 23:30:32 UTC (rev 5473) @@ -20,7 +20,7 @@ from java.lang import System import os -from org.python.core.util.StringUtil import asPyString +from org.python.core.Py import newString as asPyString def _tostr(s, method): Modified: trunk/jython/Lib/os.py =================================================================== --- trunk/jython/Lib/os.py 2008-10-19 23:18:22 UTC (rev 5472) +++ trunk/jython/Lib/os.py 2008-10-19 23:30:32 UTC (rev 5473) @@ -48,7 +48,7 @@ from java.io import File from org.python.core import PyFile from org.python.core.io import FileDescriptors, FileIO, IOBase -from org.python.core.util.StringUtil import asPyString +from org.python.core.Py import newString as asPyString # Mapping of: os._name: [name list, shell command list] _os_map = dict(nt=[ Modified: trunk/jython/Lib/socket.py =================================================================== --- trunk/jython/Lib/socket.py 2008-10-19 23:18:22 UTC (rev 5472) +++ trunk/jython/Lib/socket.py 2008-10-19 23:30:32 UTC (rev 5473) @@ -81,7 +81,7 @@ import org.python.core.io.DatagramSocketIO import org.python.core.io.ServerSocketIO import org.python.core.io.SocketIO -from org.python.core.util.StringUtil import asPyString +from org.python.core.Py import newString as asPyString class error(Exception): pass class herror(error): pass Modified: trunk/jython/src/org/python/core/util/StringUtil.java =================================================================== --- trunk/jython/src/org/python/core/util/StringUtil.java 2008-10-19 23:18:22 UTC (rev 5472) +++ trunk/jython/src/org/python/core/util/StringUtil.java 2008-10-19 23:30:32 UTC (rev 5473) @@ -5,7 +5,6 @@ import java.nio.ByteBuffer; import org.python.core.Py; -import org.python.core.PyString; /** * String Utility methods. @@ -84,8 +83,4 @@ chars[0] = Character.toLowerCase(c0); return new String(chars); } - - public static PyString asPyString(String string) { - return new PyString(string); } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |