1. 18 Tem, 2001 1 kayıt (commit)
    • Tim Peters's avatar
      SF bug #442520: test_struct fails on SPARC. · 3dac5592
      Tim Peters yazdı
      The ob_sval member of a string object isn't necessarily aligned to better
      than a native long, so the new "q" and "Q" struct codes can't get away w/
      casting tricks on platforms where LONG_LONG requires stricter-than-long
      alignment.  After I thought of a few elaborate workarounds, Guido bashed
      me over the head with the obvious memcpy approach, herewith implemented.
      3dac5592
  2. 13 Haz, 2001 1 kayıt (commit)
  3. 12 Haz, 2001 1 kayıt (commit)
    • Tim Peters's avatar
      Added q/Q standard (x-platform 8-byte ints) mode in struct module. · 7a3bfc3a
      Tim Peters yazdı
      This completes the q/Q project.
      
      longobject.c _PyLong_AsByteArray:  The original code had a gross bug:
      the most-significant Python digit doesn't necessarily have SHIFT
      significant bits, and you really need to count how many copies of the sign
      bit it has else spurious overflow errors result.
      
      test_struct.py:  This now does exhaustive std q/Q testing at, and on both
      sides of, all relevant power-of-2 boundaries, both positive and negative.
      
      NEWS:  Added brief dict news while I was at it.
      7a3bfc3a
  4. 11 Haz, 2001 3 kayıt (commit)
  5. 10 Haz, 2001 1 kayıt (commit)
    • Tim Peters's avatar
      Initial support for 'q' and 'Q' struct format codes: for now, only in · 7b9542a3
      Tim Peters yazdı
      native mode, and only when config #defines HAVE_LONG_LONG.  Standard mode
      will eventually treat them as 8-byte ints across all platforms, but that
      likely requires a new set of routines in longobject.c first (while
      sizeof(long) >= 4 is guaranteed by C, there's nothing in C we can rely
      on x-platform to hold 8 bytes of int, so we'll have to roll our own;
      I'm thinking of a simple pair of conversion functions, Python long
      to/from sized vector of unsigned bytes; that may be useful for GMP
      conversions too; std q/Q would call them with size fixed at 8).
      
      test_struct.py:  In addition to adding some native-mode 'q' and 'Q' tests,
      got rid of unused code, and repaired a non-portable assumption about
      native sizeof(short) (it isn't 2 on some Cray boxes).
      
      libstruct.tex:  In addition to adding a bit of 'q'/'Q' docs (more needed
      later), removed an erroneous footnote about 'I' behavior.
      7b9542a3
  6. 08 Nis, 2001 1 kayıt (commit)
    • Tim Peters's avatar
      Repair portability of sign extension when reading signed ints on boxes · f0e717bd
      Tim Peters yazdı
      where sizeof(long)==8.  This *was* broken on boxes where signed right
      shifts didn't sign-extend, but not elsewhere.  Unfortunately, apart
      from the Cray T3E I don't know of such a box, and Guido has so far
      refused to buy me any Cray machines for home Python testing <wink>.
      
      More immediately interesting would be if someone could please test
      this on *any* sizeof(long)==8 box, to make sure I didn't break it.
      f0e717bd
  7. 26 Eyl, 2000 1 kayıt (commit)
  8. 15 Eyl, 2000 2 kayıt (commit)
  9. 01 Eyl, 2000 1 kayıt (commit)
  10. 31 Tem, 2000 1 kayıt (commit)
  11. 21 Tem, 2000 1 kayıt (commit)
    • Thomas Wouters's avatar
      Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)', · f3f33dcf
      Thomas Wouters yazdı
      and a couple of functions that were missed in the previous batches. Not
      terribly tested, but very carefully scrutinized, three times.
      
      All these were found by the little findkrc.py that I posted to python-dev,
      which means there might be more lurking. Cases such as this:
      
      long
      func(a, b)
      	long a;
      	long b; /* flagword */
      {
      
      and other cases where the last ; in the argument list isn't followed by a
      newline and an opening curly bracket. Regexps to catch all are welcome, of
      course ;)
      f3f33dcf
  12. 10 Tem, 2000 1 kayıt (commit)
  13. 09 Tem, 2000 1 kayıt (commit)
  14. 30 Haz, 2000 2 kayıt (commit)
  15. 01 Haz, 2000 1 kayıt (commit)
  16. 29 Şub, 2000 1 kayıt (commit)
  17. 04 Ara, 1998 1 kayıt (commit)
  18. 18 Eyl, 1998 1 kayıt (commit)
  19. 29 Haz, 1998 1 kayıt (commit)
  20. 28 May, 1998 1 kayıt (commit)
  21. 10 Nis, 1998 1 kayıt (commit)
  22. 21 Ara, 1997 1 kayıt (commit)
  23. 19 Ara, 1997 1 kayıt (commit)
  24. 04 Kas, 1997 1 kayıt (commit)
  25. 01 Eki, 1997 1 kayıt (commit)
    • Guido van Rossum's avatar
      Apply two changes, systematically: · 0cb96de2
      Guido van Rossum yazdı
      (1) Use PyErr_NewException("module.class", NULL, NULL) to create the
          exception object.
      
      (2) Remove all calls to Py_FatalError(); instead, return or
          ignore the errors -- the import code now checks PyErr_Occurred()
          after calling a module's init function, so it's no longer a
          fatal error for the initialization to fail.
      
      Also did some small cleanups, e.g. removed unnecessary test for
      "already initialized" from initfpectl(), and unified
      initposix()/initnt().
      
      I haven't checked this very thoroughly, so while the changes are
      pretty trivial -- beware of untested code!
      0cb96de2
  26. 05 Eyl, 1997 1 kayıt (commit)
    • Guido van Rossum's avatar
      Contribution by Hannu Krosing (with some changes). · 9eb671fa
      Guido van Rossum yazdı
      Added 'p' format character for Pascal string (i.e. leading length
      byte).  This uses the count prefix line 's' does, except that the
      count includes the length byte; i.e. '10p' takes 10 bytes packed but
      has space for a length byte and 9 data bytes.
      9eb671fa
  27. 26 Agu, 1997 1 kayıt (commit)
  28. 11 Nis, 1997 1 kayıt (commit)
  29. 03 Ock, 1997 3 kayıt (commit)
  30. 02 Ock, 1997 3 kayıt (commit)
  31. 31 Ara, 1996 2 kayıt (commit)