diff --git a/.pick_status.json b/.pick_status.json index f4f3e109d89..6eceec0d0e2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -472,7 +472,7 @@ "description": "Revert \"python: Explicitly add the 'L' suffix on Python 3\"", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "ad363913e6766280f53838126d67370f9e97aa12" }, diff --git a/src/compiler/nir/nir_algebraic.py b/src/compiler/nir/nir_algebraic.py index 37fefd87a6b..c5b47ff9282 100644 --- a/src/compiler/nir/nir_algebraic.py +++ b/src/compiler/nir/nir_algebraic.py @@ -249,16 +249,7 @@ class Constant(Value): if isinstance(self.value, integer_types): return hex(self.value) elif isinstance(self.value, float): - i = struct.unpack('Q', struct.pack('d', self.value))[0] - h = hex(i) - - # On Python 2 this 'L' suffix is automatically added, but not on Python 3 - # Adding it explicitly makes the generated file identical, regardless - # of the Python version running this script. - if h[-1] != 'L' and i > sys.maxsize: - h += 'L' - - return h + return hex(struct.unpack('Q', struct.pack('d', self.value))[0]) else: assert False