summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2005-05-27 15:23:20 (GMT)
committerMichael W. Hudson <mwh@python.net>2005-05-27 15:23:20 (GMT)
commitba283e2b7f3d970246fbd53981b18234b6ca447c (patch)
treef7f3f7ae51386b89193aad53c9c0088e8e88a48a /Python
parentff52286d4a43d2a525ace6b68775f8fc60ed7a88 (diff)
downloadcpython-ba283e2b7f3d970246fbd53981b18234b6ca447c.zip
cpython-ba283e2b7f3d970246fbd53981b18234b6ca447c.tar.gz
cpython-ba283e2b7f3d970246fbd53981b18234b6ca447c.tar.bz2
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.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index f629709..0ac46f0 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -172,6 +172,8 @@ Py_InitializeEx(int install_sigs)
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");