From: Andreas Sandberg Date: Wed, 2 May 2018 13:06:35 +0000 (+0100) Subject: python: Fix call bug in @cxxMethod when override is True X-Git-Tag: v19.0.0.0~2014 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=055a6ec3da7df5fee98d8f5ba08aaf81d5e7862c;p=gem5.git python: Fix call bug in @cxxMethod when override is True Change-Id: Ifa9efbd329fd01eb13100bc6690e651df2c12294 Signed-off-by: Andreas Sandberg Reviewed-by: Javier Setoain Reviewed-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/11514 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py index 47e647467..0a5436f5b 100644 --- a/src/python/m5/SimObject.py +++ b/src/python/m5/SimObject.py @@ -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)