mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Added 1995 to copyright message.
Setup.in: clarified Tk comments somewhat. structmodule.c: use memcpy() instead of double precision assignment.
This commit is contained in:
parent
b9f8d6e54d
commit
524b588553
39 changed files with 103 additions and 92 deletions
|
@ -1,6 +1,6 @@
|
|||
/***********************************************************
|
||||
Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
|
||||
Amsterdam, The Netherlands.
|
||||
Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
|
||||
The Netherlands.
|
||||
|
||||
All Rights Reserved
|
||||
|
||||
|
@ -290,7 +290,7 @@ struct_pack(self, args)
|
|||
res += sizeof(float);
|
||||
break;
|
||||
case 'd':
|
||||
*(double*)res = fval;
|
||||
memcpy(res, (char*)&fval, sizeof fval);
|
||||
res += sizeof(double);
|
||||
break;
|
||||
}
|
||||
|
@ -415,9 +415,13 @@ struct_unpack(self, args)
|
|||
break;
|
||||
|
||||
case 'd':
|
||||
v = newfloatobject(*(double*)str);
|
||||
{
|
||||
double d;
|
||||
memcpy((char *)&d, str, sizeof d);
|
||||
v = newfloatobject(d);
|
||||
str += sizeof(double);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
err_setstr(StructError, "bad char in fmt");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue