Update of /cvsroot/jython/jython/org/python/core
In directory slayer.i.sourceforge.net:/tmp/cvs-serv11959
Modified Files:
PyString.java
Log Message:
__tojava__(): Allow a string to be coerced to char array.
Index: PyString.java
===================================================================
RCS file: /cvsroot/jython/jython/org/python/core/PyString.java,v
retrieving revision 2.30
retrieving revision 2.31
diff -C2 -r2.30 -r2.31
*** PyString.java 2000/12/04 21:47:21 2.30
--- PyString.java 2000/12/05 18:58:40 2.31
***************
*** 578,583 ****
return new Character(string.charAt(0));
! if (c.isArray() && c.getComponentType() == Byte.TYPE)
! return getBytes();
if (c.isInstance(this))
--- 578,587 ----
return new Character(string.charAt(0));
! if (c.isArray()) {
! if (c.getComponentType() == Byte.TYPE)
! return getBytes();
! if (c.getComponentType() == Character.TYPE)
! return string.toCharArray();
! }
if (c.isInstance(this))
|