Commit Graph

6 Commits

Author SHA1 Message Date
Mark Dickinson b96172e2cf Issue #9530: Fix undefined behaviour due to signed overflow in testcapi_long.h. 2011-11-19 17:58:15 +00:00
Nadeem Vawda 3d5881ec2b Issue #12909: Make PyLong_As* functions consistent in their use of exceptions.
PyLong_AsDouble() and PyLong_AsUnsignedLongLong() now raise TypeError (rather
than SystemError) when passed a non-integer argument, matching the behavior of
all the other PyLong_As*() functions.
2011-09-07 21:40:26 +02:00
Antoine Pitrou f95a1b3c53 Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines

  Untabify C files. Will watch buildbots.
........
2010-05-09 15:52:27 +00:00
Mark Dickinson 21776074cc 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.
........
2009-02-10 16:13:25 +00:00
Tim Peters 83c9edc05c Fix error in comment, and in test_long_api and test_longlong_api remove
the need for the F_ERROR macro.
2001-06-16 08:10:13 +00:00
Tim Peters e7c1f9b822 Add tests of PyLong_{As,From}{Unsigned,}Long. These are very much like
the new PyLong_{As,From}{Unsigned,}LongLong tests, so the bulk of the
code is in the new #include file testcapi_long.h, which generates
different code depending on how macros are set.  This sucks, but I couldn't
think of anything that sucked less.

UNIX headache?  If we still maintain dependencies by hand, someone who
knows what they're doing should teach whatever needs it that
_testcapimodule.c includes testcapi_long.h.
2001-06-14 00:55:41 +00:00