mirror of
https://github.com/python/cpython.git
synced 2025-11-13 23:46:24 +00:00
removed unused get_short() function
This commit is contained in:
parent
ae5488609a
commit
3f0b542f25
1 changed files with 0 additions and 14 deletions
|
|
@ -602,20 +602,6 @@ static PyTypeObject ZipImporter_Type = {
|
||||||
|
|
||||||
/* implementation */
|
/* implementation */
|
||||||
|
|
||||||
/* Given a buffer, return the short that is represented by the first
|
|
||||||
2 bytes, encoded as little endian. This partially reimplements
|
|
||||||
marshal.c:r_short(). */
|
|
||||||
static int
|
|
||||||
get_short(unsigned char *buf)
|
|
||||||
{
|
|
||||||
short x;
|
|
||||||
x = buf[0];
|
|
||||||
x |= buf[1] << 8;
|
|
||||||
/* Sign-extension, in case short greater than 16 bits */
|
|
||||||
x |= -(x & 0x8000);
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Given a buffer, return the long that is represented by the first
|
/* Given a buffer, return the long that is represented by the first
|
||||||
4 bytes, encoded as little endian. This partially reimplements
|
4 bytes, encoded as little endian. This partially reimplements
|
||||||
marshal.c:r_long() */
|
marshal.c:r_long() */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue