diff options
author | Guido van Rossum <guido@python.org> | 1997-04-11 20:44:04 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-04-11 20:44:04 (GMT) |
commit | 7844e38a988243b4f3d59feab0908246d37ea34c (patch) | |
tree | ba17b5c41fd0388632707e8ba3bbf41da012f6ac /Modules/structmodule.c | |
parent | 6bf62dad9e83003a70aef4158df063697926ba7c (diff) | |
download | cpython-7844e38a988243b4f3d59feab0908246d37ea34c.zip cpython-7844e38a988243b4f3d59feab0908246d37ea34c.tar.gz cpython-7844e38a988243b4f3d59feab0908246d37ea34c.tar.bz2 |
Keep Microsoft VC happy.
Diffstat (limited to 'Modules/structmodule.c')
-rw-r--r-- | Modules/structmodule.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/structmodule.c b/Modules/structmodule.c index f0fb491..dbba9b4 100644 --- a/Modules/structmodule.c +++ b/Modules/structmodule.c @@ -179,7 +179,7 @@ pack_float(x, p, incr) p += incr; /* Second byte */ - *p = ((e&1)<<7) | (fbits>>16); + *p = (char) (((e&1)<<7) | (fbits>>16)); p += incr; /* Third byte */ @@ -255,7 +255,7 @@ pack_double(x, p, incr) p += incr; /* Second byte */ - *p = ((e&0xF)<<4) | (fhi>>24); + *p = (char) (((e&0xF)<<4) | (fhi>>24)); p += incr; /* Third byte */ @@ -508,7 +508,7 @@ np_byte(p, v, f) long x; if (get_long(v, &x) < 0) return -1; - *p = x; + *p = (char)x; return 0; } @@ -536,7 +536,7 @@ np_short(p, v, f) long x; if (get_long(v, &x) < 0) return -1; - * (short *)p = x; + * (short *)p = (short)x; return 0; } @@ -700,7 +700,7 @@ bp_int(p, v, f) return -1; i = f->size; do { - p[--i] = x; + p[--i] = (char)x; x >>= 8; } while (i > 0); return 0; @@ -718,7 +718,7 @@ bp_uint(p, v, f) return -1; i = f->size; do { - p[--i] = x; + p[--i] = (char)x; x >>= 8; } while (i > 0); return 0; @@ -830,7 +830,7 @@ lp_int(p, v, f) return -1; i = f->size; do { - *p++ = x; + *p++ = (char)x; x >>= 8; } while (--i > 0); return 0; @@ -848,7 +848,7 @@ lp_uint(p, v, f) return -1; i = f->size; do { - *p++ = x; + *p++ = (char)x; x >>= 8; } while (--i > 0); return 0; |