Mercurial > cpython-lru_cache-weakref
changeset 47670:13071add8f48
Fixed compiler warnings on MSVC9.0
| author | Alexandre Vassalotti <alexandre@peadrop.com> |
|---|---|
| date | Fri, 13 Jun 2008 02:16:06 +0000 |
| parents | 31988b401535 |
| children | 8f61ae01130f |
| files | Modules/_pickle.c |
| diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Modules/_pickle.c Fri Jun 13 02:00:47 2008 +0000 +++ b/Modules/_pickle.c Fri Jun 13 02:16:06 2008 +0000 @@ -627,7 +627,7 @@ else { if (x < 256) { pdata[0] = BINPUT; - pdata[1] = x; + pdata[1] = (unsigned char)x; len = 2; } else if (x <= 0xffffffffL) { @@ -3930,7 +3930,8 @@ /* Use the size_t type to check for overflow. */ alloc = ((size_t)self->num_marks << 1) + 20; - if (alloc > PY_SSIZE_T_MAX || alloc <= (self->num_marks + 1)) { + if (alloc > PY_SSIZE_T_MAX || + alloc <= ((size_t)self->num_marks + 1)) { PyErr_NoMemory(); return -1; }
