python: Fix call bug in @cxxMethod when override is True
authorAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 2 May 2018 13:06:35 +0000 (14:06 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Thu, 28 Jun 2018 17:40:26 +0000 (17:40 +0000)
Change-Id: Ifa9efbd329fd01eb13100bc6690e651df2c12294
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Javier Setoain <javier.setoain@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/11514
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

src/python/m5/SimObject.py

index 47e64746762ec344bbaa884e8e57093bc2509dd7..0a5436f5b148c3188e6d1c7a00d8ab844a4472a0 100644 (file)
@@ -898,7 +898,7 @@ def cxxMethod(*args, **kwargs):
 
         @wraps(func)
         def py_call(self, *args, **kwargs):
-            return self.func(*args, **kwargs)
+            return func(self, *args, **kwargs)
 
         f = py_call if override else cxx_call
         f.__pybind = PyBindMethod(name, cxx_name=cxx_name, args=args)