diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-06-13 02:16:06 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-06-13 02:16:06 (GMT) |
commit | 7634ff5ad6d141cab8d33fcff788b65e064a8104 (patch) | |
tree | ba5038e8f75f5785c10c9cc57b9955573fc2518b /Modules/_pickle.c | |
parent | b03ca4bc687da31942e3e9e3a923e1c4ebfc4453 (diff) | |
download | cpython-7634ff5ad6d141cab8d33fcff788b65e064a8104.zip cpython-7634ff5ad6d141cab8d33fcff788b65e064a8104.tar.gz cpython-7634ff5ad6d141cab8d33fcff788b65e064a8104.tar.bz2 |
Fixed compiler warnings on MSVC9.0
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r-- | Modules/_pickle.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 668663c..d015baf 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -627,7 +627,7 @@ memo_put(PicklerObject *self, PyObject *obj) 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 @@ load_mark(UnpicklerObject *self) /* 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; } |