From: <le...@us...> - 2008-08-18 02:40:00
|
Revision: 5195 http://jython.svn.sourceforge.net/jython/?rev=5195&view=rev Author: leosoto Date: 2008-08-18 02:39:57 +0000 (Mon, 18 Aug 2008) Log Message: ----------- PyArray#array_fromunicode: Worked around the issue described on #1105 (wrong exposed bytecode when receiving a PyUnicode argument on a exposed method), by receiving a PyObject and doing the type-check manually Modified Paths: -------------- branches/asm/src/org/python/core/PyArray.java Modified: branches/asm/src/org/python/core/PyArray.java =================================================================== --- branches/asm/src/org/python/core/PyArray.java 2008-08-18 02:12:34 UTC (rev 5194) +++ branches/asm/src/org/python/core/PyArray.java 2008-08-18 02:39:57 UTC (rev 5195) @@ -978,7 +978,10 @@ } @ExposedMethod - final void array_fromunicode(PyUnicode input) { + final void array_fromunicode(PyObject input) { + if (!(input instanceof PyUnicode)) { + throw Py.ValueError("fromunicode argument must be an unicode object"); + } if (!"u".equals(typecode)) { throw Py.ValueError("fromunicode() may only be called on type 'u' arrays"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |