From: <zy...@us...> - 2008-06-30 18:08:38
|
Revision: 4826 http://jython.svn.sourceforge.net/jython/?rev=4826&view=rev Author: zyasoft Date: 2008-06-30 11:08:37 -0700 (Mon, 30 Jun 2008) Log Message: ----------- Restored cStringIO.getString Modified Paths: -------------- branches/asm/src/org/python/modules/cStringIO.java Modified: branches/asm/src/org/python/modules/cStringIO.java =================================================================== --- branches/asm/src/org/python/modules/cStringIO.java 2008-06-30 16:14:30 UTC (rev 4825) +++ branches/asm/src/org/python/modules/cStringIO.java 2008-06-30 18:08:37 UTC (rev 4826) @@ -354,5 +354,20 @@ } } + + private static String[] strings = new String[256]; + static String getString(char ch) { + if (ch > 255) { + return new String(new char[] { ch }); + } + String s = strings[ch]; + + if (s == null) { + s = new String(new char[] { ch }); + strings[ch] = s; + } + return s; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |