Staging
v0.5.1
https://github.com/python/cpython
Revision a40c793d06ee2b42a5013015352616b4ca6b288b authored by Tim Peters on 05 September 2001, 22:36:56 UTC, committed by Tim Peters on 05 September 2001, 22:36:56 UTC
requires that errno ever get set, and it looks like glibc is already
playing that game.  New rules:

+ Never use HUGE_VAL.  Use the new Py_HUGE_VAL instead.

+ Never believe errno.  If overflow is the only thing you're interested in,
  use the new Py_OVERFLOWED(x) macro.  If you're interested in any libm
  errors, use the new Py_SET_ERANGE_IF_OVERFLOW(x) macro, which attempts
  to set errno the way C89 said it worked.

Unfortunately, none of these are reliable, but they work on Windows and I
*expect* under glibc too.
1 parent 75ed167
History
Tip revision: a40c793d06ee2b42a5013015352616b4ca6b288b authored by Tim Peters on 05 September 2001, 22:36:56 UTC
Rework the way we try to check for libm overflow, given that C99 no longer
Tip revision: a40c793
File Mode Size
.cvsignore -rw-r--r-- 17 bytes
abstract.c -rw-r--r-- 38.0 KB
bufferobject.c -rw-r--r-- 11.1 KB
cellobject.c -rw-r--r-- 2.3 KB
classobject.c -rw-r--r-- 54.0 KB
cobject.c -rw-r--r-- 3.6 KB
complexobject.c -rw-r--r-- 21.0 KB
descrobject.c -rw-r--r-- 23.0 KB
dictobject.c -rw-r--r-- 47.7 KB
fileobject.c -rw-r--r-- 34.2 KB
floatobject.c -rw-r--r-- 20.0 KB
frameobject.c -rw-r--r-- 11.8 KB
funcobject.c -rw-r--r-- 14.0 KB
intobject.c -rw-r--r-- 24.3 KB
iterobject.c -rw-r--r-- 5.8 KB
listobject.c -rw-r--r-- 44.3 KB
longobject.c -rw-r--r-- 51.6 KB
methodobject.c -rw-r--r-- 7.1 KB
moduleobject.c -rw-r--r-- 5.4 KB
object.c -rw-r--r-- 43.1 KB
obmalloc.c -rw-r--r-- 22.2 KB
rangeobject.c -rw-r--r-- 6.9 KB
sliceobject.c -rw-r--r-- 4.4 KB
stringobject.c -rw-r--r-- 83.8 KB
tupleobject.c -rw-r--r-- 14.4 KB
typeobject.c -rw-r--r-- 82.8 KB
unicodectype.c -rw-r--r-- 8.6 KB
unicodeobject.c -rw-r--r-- 129.0 KB
unicodetype_db.h -rw-r--r-- 37.0 KB
xxobject.c -rw-r--r-- 2.4 KB

back to top