1. 03 Jan, 1997 19 commits
  2. 02 Jan, 1997 10 commits
  3. 31 Dec, 1996 11 commits
    • Guido van Rossum's avatar
      The usual... · d5f06113
      Guido van Rossum authored
      d5f06113
    • Guido van Rossum's avatar
      32c9e618
    • Fred Drake's avatar
    • Fred Drake's avatar
      (formatter.py): Add a flush() method to the writer interface. This really · f045879e
      Fred Drake authored
      	needs to be a standard part of the interface, so we'll have it in
      	for the next release.
      f045879e
    • Guido van Rossum's avatar
      Exercise the new feature set somewhat. · 6b3a3035
      Guido van Rossum authored
      Use TestFailed exception and verbose flag from test_support module.
      6b3a3035
    • Guido van Rossum's avatar
      Added better handling of unsigned longs -- a Python long returned by · 50ff94c1
      Guido van Rossum authored
      unpack('L', ...) is now acceptable to pack('L', ...).
      50ff94c1
    • Guido van Rossum's avatar
      Rewrote _{read,write}_{short,long} to use the newly revamped struct · 03255706
      Guido van Rossum authored
      module.  (Small problem: struct.pack() won't deal with the Python long
      ints returned by struct.unpack() for the 'L' format.  Worked around
      that for now.)
      03255706
    • Guido van Rossum's avatar
      Added libstat.tex · 42fefe8d
      Guido van Rossum authored
      42fefe8d
    • Guido van Rossum's avatar
      Document the new extensions. · 37829195
      Guido van Rossum authored
      37829195
    • Guido van Rossum's avatar
      Fix the first bugs... treatment of 0 count was wrong, and memchr() · 71192e58
      Guido van Rossum authored
      should be memset().
      71192e58
    • Guido van Rossum's avatar
      Pretty much rewritten to fulfull several long-standing wishes: · 82e15c52
      Guido van Rossum authored
      -- The whole implementation is now more table-driven.
      
      -- Unsigned integers.  Format characters 'B', 'H', 'I' and 'L'
      mean unsigned byte, short, int and long.  For 'I' and 'L', the return
      value is a Python long integer if a Python plain integer can't
      represent the required range (note: this is dependent on the size of
      the relevant C types only, not of the sign of the actual value).
      
      -- A new format character 's' packs/unpacks a string.  When given a
      count prefix, this is the size of the string, not a repeat count like
      for the other format characters; e.g. '10s' means a single 10-byte
      string, while '10c' means 10 characters.  For packing, the string is
      truncated or padded with null bytes as appropriate to make it fit.
      For unpacking, the resulting string always has exactly the specified
      number of bytes.  As a special case, '0s' means a single, empty
      string (while '0c' means 0 characters).
      
      -- Various byte order options.  The first character of the format
      string determines the byte order, size and alignment, as follows:
      
      First character		Byte order		size and alignment
      
      	'@'		native			native
      	'='		native			standard
      	'<'		little-endian		standard
      	'>'		big-endian		standard
      	'!'		network (= big-endian)	standard
      
      If the first character is not one of these, '@' is assumed.
      
      Native byte order is big-endian or little-endian, depending on the
      host system (e.g. Motorola and Sun are big-endian; Intel and DEC are
      little-endian).
      
      Native size and alignment are determined using the C compiler's sizeof
      expression.  This is always combined with native byte order.
      
      Standard size and alignment are as follows: no alignment is required
      for any type (so you have to use pad bytes); short is 2 bytes; int and
      long are 4 bytes.  In this mode, there is no support for float and
      double.
      
      Note the difference between '@' and '=': both use native byte order,
      but the size and alignment of the latter is standardized.
      
      The form '!' is available for those poor souls who can't remember
      whether network byte order is big-endian or little-endian.
      
      There is no way to indicate non-native byte order (i.e. force
      byte-swapping); use the appropriate choice of '<' or '>'.
      82e15c52