From: <fwi...@us...> - 2006-11-27 02:30:52
|
Revision: 2995 http://svn.sourceforge.net/jython/?rev=2995&view=rev Author: fwierzbicki Date: 2006-11-26 18:30:51 -0800 (Sun, 26 Nov 2006) Log Message: ----------- merged fixes for bug 1603312 and 1603315 from trunk. Modified Paths: -------------- branches/2.3/src/org/python/core/PyInteger.java branches/2.3/src/org/python/core/PyString.java Modified: branches/2.3/src/org/python/core/PyInteger.java =================================================================== --- branches/2.3/src/org/python/core/PyInteger.java 2006-11-27 02:08:28 UTC (rev 2994) +++ branches/2.3/src/org/python/core/PyInteger.java 2006-11-27 02:30:51 UTC (rev 2995) @@ -1211,7 +1211,8 @@ return new PyIntegerDerived(subtype, ((PyInteger)intOrLong).getValue()); } else { - err_ovf("long int too large to convert to int"); + throw Py + .OverflowError("long int too large to convert to int"); } } if (!(x instanceof PyString)) { Modified: branches/2.3/src/org/python/core/PyString.java =================================================================== --- branches/2.3/src/org/python/core/PyString.java 2006-11-27 02:08:28 UTC (rev 2994) +++ branches/2.3/src/org/python/core/PyString.java 2006-11-27 02:30:51 UTC (rev 2995) @@ -2792,7 +2792,7 @@ final static PyObject str_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords) { - ArgParser ap = new ArgParser("str", args, keywords, new String[] { "S" }, 0); + ArgParser ap = new ArgParser("str", args, keywords, new String[] { "object" }, 0); PyObject S = ap.getPyObject(0, null); if (new_.for_type == subtype) { return returnString(S); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |