From ba283e2b7f3d970246fbd53981b18234b6ca447c Mon Sep 17 00:00:00 2001 From: "Michael W. Hudson" Date: Fri, 27 May 2005 15:23:20 +0000 Subject: 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. --- Python/pythonrun.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index f629709af8..0ac46f07b0 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"); -- cgit v1.2.1