diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-05 07:10:23 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-05 07:10:23 (GMT) |
commit | 67c719b34b86ba073e6f25cfa3e1994ecb16b888 (patch) | |
tree | 7874b80f9e183ee99596bf9a6dfce6dee2489feb /Modules/_pickle.c | |
parent | 2ee44f7f5584b343ee26fb2be46ffde571a5e63d (diff) | |
download | cpython-67c719b34b86ba073e6f25cfa3e1994ecb16b888.zip cpython-67c719b34b86ba073e6f25cfa3e1994ecb16b888.tar.gz cpython-67c719b34b86ba073e6f25cfa3e1994ecb16b888.tar.bz2 |
Silenced some warnings about comparison between signed and unsigned integer
expressions.
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r-- | Modules/_pickle.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c index ba9ba99..24524a6 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -1456,7 +1456,7 @@ memo_get(PicklerObject *self, PyObject *key) pdata[1] = (unsigned char)(*value & 0xff); len = 2; } - else if (*value <= 0xffffffffL) { + else if ((size_t)*value <= 0xffffffffUL) { pdata[0] = LONG_BINGET; pdata[1] = (unsigned char)(*value & 0xff); pdata[2] = (unsigned char)((*value >> 8) & 0xff); @@ -1513,7 +1513,7 @@ memo_put(PicklerObject *self, PyObject *obj) pdata[1] = (unsigned char)idx; len = 2; } - else if (idx <= 0xffffffffL) { + else if ((size_t)idx <= 0xffffffffUL) { pdata[0] = LONG_BINPUT; pdata[1] = (unsigned char)(idx & 0xff); pdata[2] = (unsigned char)((idx >> 8) & 0xff); @@ -2013,7 +2013,7 @@ save_bytes(PicklerObject *self, PyObject *obj) header[1] = (unsigned char)size; len = 2; } - else if (size <= 0xffffffffL) { + else if ((size_t)size <= 0xffffffffUL) { header[0] = BINBYTES; header[1] = (unsigned char)(size & 0xff); header[2] = (unsigned char)((size >> 8) & 0xff); |