- 18 Tem, 2001 1 kayıt (commit)
-
-
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.
-
- 13 Haz, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
Repaired that, and added appropriate tests for it to test_struct.py.
-
- 12 Haz, 2001 1 kayıt (commit)
-
-
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.
-
- 11 Haz, 2001 3 kayıt (commit)
-
-
Tim Peters yazdı
-
Tim Peters yazdı
in native mode on platforms that don't HAVE_LONG_LONG.
-
Tim Peters yazdı
not just to alignment. Spotted by Guido. Bugfix candidate.
-
- 10 Haz, 2001 1 kayıt (commit)
-
-
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.
-
- 08 Nis, 2001 1 kayıt (commit)
-
-
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.
-
- 26 Eyl, 2000 1 kayıt (commit)
-
-
Fred Drake yazdı
Add definitions of INT_MAX and LONG_MAX to pyport.h. Remove includes of limits.h and conditional definitions of INT_MAX and LONG_MAX elsewhere. This closes SourceForge patch #101659 and bug #115323.
-
- 15 Eyl, 2000 2 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
Martin v. Löwis yazdı
-
- 01 Eyl, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
This should match the situation in the 1.6b1 tree.
-
- 31 Tem, 2000 1 kayıt (commit)
-
-
Peter Schneider-Kamp yazdı
marked my*.h as obsolete
-
- 21 Tem, 2000 1 kayıt (commit)
-
-
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 ;)
-
- 10 Tem, 2000 1 kayıt (commit)
-
-
Peter Schneider-Kamp yazdı
-
- 09 Tem, 2000 1 kayıt (commit)
-
-
Tim Peters yazdı
-
- 30 Haz, 2000 2 kayıt (commit)
-
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
-
- 01 Haz, 2000 1 kayıt (commit)
-
-
Fred Drake yazdı
Removed PyErr_BadArgument() calls and replaced them with more useful error messages.
-
- 29 Şub, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
PyArg_ParseTuple() format string arguments as possible.
-
- 04 Ara, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
on BeOS or Windows.
-
- 18 Eyl, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
native format, as void* (translated to Python int or long). Also adds PyLong_FromVoidPtr and PyLong_AsVoidPtr to longobject.c.
-
- 29 Haz, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 28 May, 1998 1 kayıt (commit)
-
-
Fred Drake yazdı
-
- 10 Nis, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 21 Ara, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
but other compilers don't like.
-
- 19 Ara, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 04 Kas, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
0.0 as float or double would yield the representation for 1.0!
-
- 01 Eki, 1997 1 kayıt (commit)
-
-
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!
-
- 05 Eyl, 1997 1 kayıt (commit)
-
-
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.
-
- 26 Agu, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 11 Nis, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 03 Ock, 1997 3 kayıt (commit)
-
-
Guido van Rossum yazdı
int/long types, and use the new PyLong_FromUnsignedLong() and PyLong_AsUnsignedLong() interfaces instead. Semantic change: the 'I' format will now always return a long int.
-
Guido van Rossum yazdı
-
Barry Warsaw yazdı
-
- 02 Ock, 1997 3 kayıt (commit)
-
-
Guido van Rossum yazdı
Still don't know what to do with Inf/NaN, so I raise an exception on pack(), and something random decided by ldexp() will happen on unpack().
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
These use the ANSI/IEEE standard, which is also used by XDR; so the _xdr module may become obsolete.
-
- 31 Ara, 1996 2 kayıt (commit)
-
-
Guido van Rossum yazdı
unpack('L', ...) is now acceptable to pack('L', ...).
-
Guido van Rossum yazdı
should be memset().
-