[Patches] [ python-Patches-470614 ] PyMarshal_ReadFileFromLong()
noreply@sourceforge.net
noreply@sourceforge.net
Sat, 13 Oct 2001 21:46:41 -0700
Patches item #470614, was opened at 2001-10-12 08:39
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=470614&group_id=5470
Category: Documentation
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: James C. Ahlstrom (ahlstromjc)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: PyMarshal_ReadFileFromLong()
Initial Comment:
Here is some documentation for marshal.
long PyMarshal_ReadLongFromFile(FILE *fp)
Read four bytes from an open file pointer, and return a
long. The
file bytes are in little-endian order; the least
significant byte
is first. The long is considered to be signed. That
is, if
the 4-byte long is negative, and if the size of a
native long
is more than four bytes, the long is sign extended.
int PyMarshal_ReadShortFromFile(FILE *fp)
The same as PyMarshal_ReadLongFromFile(), but read two
bytes,
sign extend, and return an int.
----------------------------------------------------------------------
>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-10-13 21:46
Message:
Logged In: YES
user_id=3066
The error reporting behavior of these functions is
questionable at best; perhaps something that can clearly
distinguish between errors and negative numbers makes more
sense?
Anyway, I've checked in docs for what is currently there as
Doc/api/utilities.tex revision 1.2.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=470614&group_id=5470