mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Fixed compiler warnings on MSVC9.0
This commit is contained in:
parent
b03ca4bc68
commit
7634ff5ad6
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue