summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2009-02-28 10:00:59 +0000
committerBob Ippolito <bob@redivi.com>2009-02-28 10:00:59 +0000
commit85e1e6878525c63441d120c39a198f33cc392816 (patch)
tree17068d51e1a9d16b3caea3670604d28c9ac7590b
parent76439d79b15bd77ca96116721b20bc7631c501f1 (diff)
downloadsimplejson-85e1e6878525c63441d120c39a198f33cc392816.tar.gz
comment about weird struct usage per http://codereview.appspot.com/20095/diff/1/13#newcode21
git-svn-id: http://simplejson.googlecode.com/svn/trunk@175 a4795897-2c25-0410-b006-0d3caba88fa1
-rw-r--r--simplejson/decoder.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/simplejson/decoder.py b/simplejson/decoder.py
index abdc585..6df951b 100644
--- a/simplejson/decoder.py
+++ b/simplejson/decoder.py
@@ -16,6 +16,8 @@ FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
def _floatconstants():
_BYTES = '7FF80000000000007FF0000000000000'.decode('hex')
+ # The struct module in Python 2.4 would get frexp() out of range here
+ # when an endian is specified in the format string. Fixed in Python 2.5+
if sys.byteorder != 'big':
_BYTES = _BYTES[:8][::-1] + _BYTES[8:][::-1]
nan, inf = struct.unpack('dd', _BYTES)