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:
Guido van Rossum 1995-01-04 19:10:35 +00:00
parent b9f8d6e54d
commit 524b588553
39 changed files with 103 additions and 92 deletions

View file

@ -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");