diff options
author | Guido van Rossum <guido@python.org> | 1997-04-09 19:24:53 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-04-09 19:24:53 (GMT) |
commit | 644a12b00ce6a361089b488aa8096a6c86b52275 (patch) | |
tree | 73e3cfeeba809a3fc43f42d1883ebe9dffe3ffda /Python/structmember.c | |
parent | 801776742082034cc6193530326af042d5af56a5 (diff) | |
download | cpython-644a12b00ce6a361089b488aa8096a6c86b52275.zip cpython-644a12b00ce6a361089b488aa8096a6c86b52275.tar.gz cpython-644a12b00ce6a361089b488aa8096a6c86b52275.tar.bz2 |
Tweaks to keep the Microsoft compiler quier.
Diffstat (limited to 'Python/structmember.c')
-rw-r--r-- | Python/structmember.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Python/structmember.c b/Python/structmember.c index 7e24fa5..f5cca97 100644 --- a/Python/structmember.c +++ b/Python/structmember.c @@ -186,7 +186,7 @@ setmember(addr, mlist, name, v) err_badarg(); return -1; } - *(char*)addr = getintvalue(v); + *(char*)addr = (char) getintvalue(v); break; case T_SHORT: case T_USHORT: @@ -194,7 +194,7 @@ setmember(addr, mlist, name, v) err_badarg(); return -1; } - *(short*)addr = getintvalue(v); + *(short*)addr = (short) getintvalue(v); break; case T_UINT: case T_INT: @@ -202,7 +202,7 @@ setmember(addr, mlist, name, v) err_badarg(); return -1; } - *(int*)addr = getintvalue(v); + *(int*)addr = (int) getintvalue(v); break; case T_LONG: if (!is_intobject(v)) { @@ -223,9 +223,10 @@ setmember(addr, mlist, name, v) break; case T_FLOAT: if (is_intobject(v)) - *(float*)addr = getintvalue(v); + *(float*)addr = (float) getintvalue(v); else if (is_floatobject(v)) - *(float*)addr = getfloatvalue(v); + *(float*)addr = + (float) getfloatvalue(v); else { err_badarg(); return -1; @@ -233,7 +234,8 @@ setmember(addr, mlist, name, v) break; case T_DOUBLE: if (is_intobject(v)) - *(double*)addr = getintvalue(v); + *(double*)addr = + (double) getintvalue(v); else if (is_floatobject(v)) *(double*)addr = getfloatvalue(v); else { |