From: Gabe Black Date: Mon, 25 Sep 2017 22:15:45 +0000 (-0700) Subject: sim: Add a set_parent to NullSimObject which does nothing. X-Git-Tag: v19.0.0.0~2627 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9015069ea0c82221bd4665a5bdf9a9b46a7fd904;p=gem5.git sim: Add a set_parent to NullSimObject which does nothing. This lets attempts to set_parent on NullSimObject fall away harmlessly without having to add a bunch of checks whenever set_parent is called. Change-Id: I6d3510772ba71e765c4739e486e9f3d2460c4e11 Reviewed-on: https://gem5-review.googlesource.com/4840 Reviewed-by: Jason Lowe-Power Maintainer: Gabe Black --- diff --git a/src/python/m5/params.py b/src/python/m5/params.py index 776fbe22b..b49f811d1 100644 --- a/src/python/m5/params.py +++ b/src/python/m5/params.py @@ -1710,6 +1710,9 @@ class NullSimObject(object): def set_path(self, parent, name): pass + def set_parent(self, parent, name): + pass + def __str__(self): return 'Null'