[Python-checkins] CVS: python/dist/src/Misc NEWS,1.181,1.182
Tim Peters
tim_one@users.sourceforge.net
Sun, 10 Jun 2001 16:40:21 -0700
Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv6496/python/dist/src/Misc
Modified Files:
NEWS
Log Message:
Initial support for 'q' and 'Q' struct format codes: for now, only in
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.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.181
retrieving revision 1.182
diff -C2 -r1.181 -r1.182
*** NEWS 2001/06/06 13:30:54 1.181
--- NEWS 2001/06/10 23:40:19 1.182
***************
*** 141,144 ****
--- 141,152 ----
- pprint functions now much faster for large containers (tuple, list, dict).
+ - New 'q' and 'Q' format codes in the struct module, corresponding to C
+ types "long long" and "unsigned long long" (on Windows, __int64). In
+ native mode, these can be used only when the platform C compiler supports
+ these types (when HAVE_LONG_LONG is #define'd by the Python config
+ process), and then they inherit the sizes and alignments of the C types.
+ XXX TODO In standard mode, 'q' and 'Q' are supported on all platforms, and
+ XXX TODO are 8-byte integral types.
+
Tests