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-- 22 bytes
acceler.c -rw-r--r-- 3.2 KB
assert.h -rw-r--r-- 405 bytes
bitset.c -rw-r--r-- 949 bytes
firstsets.c -rw-r--r-- 2.1 KB
grammar.c -rw-r--r-- 4.6 KB
grammar1.c -rw-r--r-- 1001 bytes
intrcheck.c -rw-r--r-- 2.9 KB
listnode.c -rw-r--r-- 983 bytes
metagrammar.c -rw-r--r-- 2.1 KB
myreadline.c -rw-r--r-- 2.9 KB
node.c -rw-r--r-- 1.3 KB
parser.c -rw-r--r-- 8.7 KB
parser.h -rw-r--r-- 966 bytes
parsetok.c -rw-r--r-- 4.1 KB
pgen.c -rw-r--r-- 14.2 KB
pgen.h -rw-r--r-- 253 bytes
pgenmain.c -rw-r--r-- 3.5 KB
printgrammar.c -rw-r--r-- 2.4 KB
tokenizer.c -rw-r--r-- 17.9 KB
tokenizer.h -rw-r--r-- 1.8 KB

back to top