Skip to content

Commit 9a1e23a

Browse files
authored
Merge pull request #5 from corona10/gh-3
stdlib.json.decoder: Hot fix for json decoder
2 parents 9df19bb + 321a0ac commit 9a1e23a

File tree

1 file changed

+4
-2
lines changed
  • grumpy-runtime-src/third_party/stdlib/json

1 file changed

+4
-2
lines changed

grumpy-runtime-src/third_party/stdlib/json/decoder.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
1919

2020
def _floatconstants():
21-
nan, = struct.unpack('>d', b'\x7f\xf8\x00\x00\x00\x00\x00\x00')
22-
inf, = struct.unpack('>d', b'\x7f\xf0\x00\x00\x00\x00\x00\x00')
21+
nan = struct.unpack('>d', b'\x7f\xf8\x00\x00\x00\x00\x00\x00')
22+
inf = struct.unpack('>d', b'\x7f\xf0\x00\x00\x00\x00\x00\x00')
23+
nan = nan[0]
24+
inf = inf[0]
2325
return nan, inf, -inf
2426

2527
NaN, PosInf, NegInf = _floatconstants()

0 commit comments

Comments
 (0)