diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-02-10 16:13:25 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-02-10 16:13:25 (GMT) |
commit | 21776074cc300dbdea412aa57cb6efdd126dcff6 (patch) | |
tree | 572f170fc1e492de76de035241f3d77228c9c171 /Objects/longobject.c | |
parent | eeba356308cd6e6e11ed8c50e5d6ebac32b42e1c (diff) | |
download | cpython-21776074cc300dbdea412aa57cb6efdd126dcff6.zip cpython-21776074cc300dbdea412aa57cb6efdd126dcff6.tar.gz cpython-21776074cc300dbdea412aa57cb6efdd126dcff6.tar.bz2 |
Merged revisions 69498 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r69498 | mark.dickinson | 2009-02-10 15:46:50 +0000 (Tue, 10 Feb 2009) | 6 lines
Issue #5175: PyLong_AsUnsignedLongLong now raises OverflowError for
negative arguments. Previously, it raised TypeError.
Thanks Lisandro Dalcin.
........
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r-- | Objects/longobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index e8d315d..e2ab078 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -786,7 +786,7 @@ _PyLong_AsByteArray(PyLongObject* v, if (Py_SIZE(v) < 0) { ndigits = -(Py_SIZE(v)); if (!is_signed) { - PyErr_SetString(PyExc_TypeError, + PyErr_SetString(PyExc_OverflowError, "can't convert negative int to unsigned"); return -1; } |