From b5b19d247024022a93df320158a2aea2a772e54f Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 25 Jan 2019 18:38:03 +0000 Subject: python: Add Python 3 workarounds for long Python 3 doesn't have a separate long type. Make long an alias for int where needed to maintain compatibility. Change-Id: I4c0861302bc3a2fa5226b3041803ef975d29b2fd Signed-off-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/c/15988 Reviewed-by: Nikos Nikoleris --- src/python/m5/util/smartdict.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/python/m5/util/smartdict.py') diff --git a/src/python/m5/util/smartdict.py b/src/python/m5/util/smartdict.py index 3cfe3294e..dabc3f86b 100644 --- a/src/python/m5/util/smartdict.py +++ b/src/python/m5/util/smartdict.py @@ -43,6 +43,9 @@ from __future__ import print_function from __future__ import absolute_import +import six +if six.PY3: + long = int from .convert import * from .attrdict import attrdict -- cgit v1.2.3