Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 34972:1dd8a0d64432 legacy-trunk
This is my patch:
[ 1181301 ] make float packing copy bytes when they can
which hasn't been reviewed, despite numerous threats to check it in
anyway if noone reviews it. Please read the diff on the checkin list,
at least!
The basic idea is to examine the bytes of some 'probe values' to see if
the current platform is a IEEE 754-ish platform, and if so
_PyFloat_{Pack,Unpack}{4,8} just copy bytes around.
The rest is hair for testing, and tests.
| author | Michael W. Hudson <mwh@python.net> |
|---|---|
| date | Fri, 27 May 2005 15:23:20 +0000 |
| parents | 7cfda9898863 |
| children | 26bf6c27e9ce |
line wrap: on
line diff
--- a/Python/pythonrun.c Fri May 27 14:58:06 2005 +0000 +++ b/Python/pythonrun.c Fri May 27 15:23:20 2005 +0000 @@ -172,6 +172,8 @@ if (!_PyInt_Init()) Py_FatalError("Py_Initialize: can't init ints"); + _PyFloat_Init(); + interp->modules = PyDict_New(); if (interp->modules == NULL) Py_FatalError("Py_Initialize: can't make modules dictionary");
