diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2019-01-25 18:38:03 +0000 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2019-02-25 14:25:24 +0000 |
commit | b5b19d247024022a93df320158a2aea2a772e54f (patch) | |
tree | 7526180743cf2ec957e92108819f61a5d173cdeb /src/python/m5/SimObject.py | |
parent | debb5daace15e17bae7c07937852f6f738633c85 (diff) | |
download | gem5-b5b19d247024022a93df320158a2aea2a772e54f.tar.xz |
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 <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15988
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/python/m5/SimObject.py')
-rw-r--r-- | src/python/m5/SimObject.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py index 5a869125e..7f19c0776 100644 --- a/src/python/m5/SimObject.py +++ b/src/python/m5/SimObject.py @@ -45,6 +45,9 @@ from __future__ import print_function from __future__ import absolute_import +import six +if six.PY3: + long = int import sys from types import FunctionType, MethodType, ModuleType |