diff options
author | Guido van Rossum <guido@python.org> | 1994-09-28 15:51:32 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-09-28 15:51:32 (GMT) |
commit | 03093a248d4ef3af23a5906dea276c01e0c1ae2c (patch) | |
tree | f58e5149812f94b2df57e1be321f227a5236ead6 /Objects/longobject.c | |
parent | 2929527aede2eab56d39cf5f5244f997479cfe9d (diff) | |
download | cpython-03093a248d4ef3af23a5906dea276c01e0c1ae2c.zip cpython-03093a248d4ef3af23a5906dea276c01e0c1ae2c.tar.gz cpython-03093a248d4ef3af23a5906dea276c01e0c1ae2c.tar.bz2 |
* Include/classobject.h, Objects/classobject.c, Python/ceval.c:
entirely redone operator overloading. The rules for class
instances are now much more relaxed than for other built-in types
(whose coerce must still return two objects of the same type)
* Objects/floatobject.c: add overflow check when converting float
to int and implement truncation towards zero using ceil/float
* Objects/longobject.c: change ValueError to OverflowError when
converting to int
* Objects/rangeobject.c: modernized
* Objects/stringobject.c: use HAVE_LIMITS instead of __STDC__
* Objects/xxobject.c: changed to use new style (not finished?)
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 45907e8..82a74c0 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -159,7 +159,7 @@ getlongvalue(vv) prev = x; x = (x << SHIFT) + v->ob_digit[i]; if ((x >> SHIFT) != prev) { - err_setstr(ValueError, + err_setstr(OverflowError, "long int too long to convert"); return -1; } |