projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b03ca4b
)
Fixed compiler warnings on MSVC9.0
author
Alexandre Vassalotti
<alexandre@peadrop.com>
Fri, 13 Jun 2008 02:16:06 +0000
(
02:16
+0000)
committer
Alexandre Vassalotti
<alexandre@peadrop.com>
Fri, 13 Jun 2008 02:16:06 +0000
(
02:16
+0000)
Modules/_pickle.c
patch
|
blob
|
history
diff --git
a/Modules/_pickle.c
b/Modules/_pickle.c
index 668663c4912754145fd71adeb79ad6c150fb490d..d015bafebebeda49b0afefcbdc4cbcb21f661a7f 100644
(file)
--- 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;
}