SimObject.py (12786:e3a5c978e7d1) SimObject.py (12805:3c900ca6be0a)
1# Copyright (c) 2017 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 884 unchanged lines hidden (view full) ---

893
894 @wraps(func)
895 def cxx_call(self, *args, **kwargs):
896 ccobj = self.getCCObject()
897 return getattr(ccobj, name)(*args, **kwargs)
898
899 @wraps(func)
900 def py_call(self, *args, **kwargs):
1# Copyright (c) 2017 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 884 unchanged lines hidden (view full) ---

893
894 @wraps(func)
895 def cxx_call(self, *args, **kwargs):
896 ccobj = self.getCCObject()
897 return getattr(ccobj, name)(*args, **kwargs)
898
899 @wraps(func)
900 def py_call(self, *args, **kwargs):
901 return self.func(*args, **kwargs)
901 return func(self, *args, **kwargs)
902
903 f = py_call if override else cxx_call
904 f.__pybind = PyBindMethod(name, cxx_name=cxx_name, args=args)
905
906 return f
907
908 if len(args) == 0:
909 return decorate

--- 684 unchanged lines hidden ---
902
903 f = py_call if override else cxx_call
904 f.__pybind = PyBindMethod(name, cxx_name=cxx_name, args=args)
905
906 return f
907
908 if len(args) == 0:
909 return decorate

--- 684 unchanged lines hidden ---