1. 28 Mar, 2008 1 kayıt (commit)
  2. 27 Mar, 2008 1 kayıt (commit)
  3. 17 Mar, 2008 1 kayıt (commit)
    • Eric Smith's avatar
      Finished backporting PEP 3127, Integer Literal Support and Syntax. · 9ff19b54
      Eric Smith yazdı
      Added 0b and 0o literals to tokenizer.
      Modified PyOS_strtoul to support 0b and 0o inputs.
      Modified PyLong_FromString to support guessing 0b and 0o inputs.
      Renamed test_hexoct.py to test_int_literal.py and added binary tests.
      Added upper and lower case 0b, 0O, and 0X tests to test_int_literal.py
      9ff19b54
  4. 23 Şub, 2008 1 kayıt (commit)
  5. 19 Ock, 2008 1 kayıt (commit)
  6. 04 Eki, 2006 1 kayıt (commit)
    • Armin Rigo's avatar
      Forward-port of r52136,52138: a review of overflow-detecting code. · 7ccbca93
      Armin Rigo yazdı
      * unified the way intobject, longobject and mystrtoul handle
        values around -sys.maxint-1.
      
      * in general, trying to entierely avoid overflows in any computation
        involving signed ints or longs is extremely involved.  Fixed a few
        simple cases where a compiler might be too clever (but that's all
        guesswork).
      
      * more overflow checks against bad data in marshal.c.
      
      * 2.5 specific: fixed a number of places that were still confusing int
        and Py_ssize_t.  Some of them could potentially have caused
        "real-world" breakage.
      
      * list.pop(x): fixing overflow issues on x was messy.  I just reverted
        to PyArg_ParseTuple("n"), which does the right thing.  (An obscure
        test was trying to give a Decimal to list.pop()... doesn't make
        sense any more IMHO)
      
      * trying to write a few tests...
      7ccbca93
  7. 27 Tem, 2006 1 kayıt (commit)
    • Tim Peters's avatar
      Bug #1521947: possible bug in mystrtol.c with recent gcc. · bc24eee3
      Tim Peters yazdı
      In general, C doesn't define anything about what happens when
      an operation on a signed integral type overflows, and PyOS_strtol()
      did several formally undefined things of that nature on signed
      longs.  Some version of gcc apparently tries to exploit that now,
      and PyOS_strtol() could fail to detect overflow then.
      
      Tried to repair all that, although it seems at least as likely to me
      that we'll get screwed by bad platform definitions for LONG_MIN
      and/or LONG_MAX now.  For that reason, I don't recommend backporting
      this.
      
      Note that I have no box on which this makes a lick of difference --
      can't really test it, except to note that it didn't break anything
      on my boxes.
      
      Silent change:  PyOS_strtol() used to return the hard-coded 0x7fffffff
      in case of overflow.  Now it returns LONG_MAX.  They're the same only on
      32-bit boxes (although C doesn't guarantee that either ...).
      bc24eee3
  8. 09 Tem, 2006 1 kayıt (commit)
  9. 10 Haz, 2006 1 kayıt (commit)
  10. 25 May, 2006 1 kayıt (commit)
  11. 23 May, 2006 1 kayıt (commit)
    • Tim Peters's avatar
      Bug #1334662 / patch #1335972: int(string, base) wrong answers. · b713ec25
      Tim Peters yazdı
      In rare cases of strings specifying true values near sys.maxint,
      and oddball bases (not decimal or a power of 2), int(string, base)
      could deliver insane answers.  This repairs all such problems, and
      also speeds string->int significantly.  On my box, here are %
      speedups for decimal strings of various lengths:
      
      length speedup
      ------ -------
       1       12.4%
       2       15.7%
       3       20.6%
       4       28.1%
       5       33.2%
       6       37.5%
       7       41.9%
       8       46.3%
       9       51.2%
      10       19.5%
      11       19.9%
      12       23.9%
      13       23.7%
      14       23.3%
      15       24.9%
      16       25.3%
      17       28.3%
      18       27.9%
      19       35.7%
      
      Note that the difference between 9 and 10 is the difference between
      short and long Python ints on a 32-bit box.  The patch doesn't
      actually do anything to speed conversion to long:  the speedup is
      due to detecting "unsigned long" overflow more quickly.
      
      This is a bugfix candidate, but it's a non-trivial patch and it
      would be painful to separate the "bug fix" from the "speed up" parts.
      b713ec25
  12. 19 Kas, 2003 1 kayıt (commit)
  13. 01 Eyl, 2000 1 kayıt (commit)
  14. 22 Tem, 2000 1 kayıt (commit)
  15. 30 Haz, 2000 2 kayıt (commit)
  16. 07 Nis, 1999 1 kayıt (commit)
  17. 18 Ara, 1998 1 kayıt (commit)
    • Guido van Rossum's avatar
      Chris H. writes: · 1924a067
      Guido van Rossum yazdı
      If we're going to put the PyOS_strtol() proto in intobject.h we should
      include it here or the symbol isn't exported on PowerPC.
      1924a067
  18. 07 Tem, 1998 1 kayıt (commit)
  19. 10 Nis, 1998 1 kayıt (commit)
  20. 15 Ara, 1997 1 kayıt (commit)
  21. 07 May, 1997 1 kayıt (commit)
  22. 09 Nis, 1997 1 kayıt (commit)
  23. 05 Ara, 1996 1 kayıt (commit)
  24. 25 Eki, 1996 1 kayıt (commit)
  25. 19 Agu, 1996 1 kayıt (commit)
  26. 01 Agu, 1996 1 kayıt (commit)
  27. 31 Tem, 1996 1 kayıt (commit)
  28. 10 Şub, 1995 1 kayıt (commit)
  29. 17 Ock, 1995 1 kayıt (commit)
  30. 04 Ock, 1995 1 kayıt (commit)
    • Guido van Rossum's avatar
      Added 1995 to copyright message. · 6d023c98
      Guido van Rossum yazdı
      bltinmodule.c: fixed coerce() nightmare in ternary pow().
      modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject().
      pythonrun.c: move flushline() into and around print_error().
      6d023c98
  31. 01 Agu, 1994 1 kayıt (commit)
  32. 24 Ara, 1993 1 kayıt (commit)