aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qapi')
-rw-r--r--scripts/qapi/schema.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py
index 231ebf6..d739e55 100644
--- a/scripts/qapi/schema.py
+++ b/scripts/qapi/schema.py
@@ -73,6 +73,11 @@ class QAPISchemaEntity:
self.features = features or []
self._checked = False
+ def __repr__(self):
+ if self.name is None:
+ return "<%s at 0x%x>" % (type(self).__name__, id(self))
+ return "<%s:%s at 0x%x>" % type(self).__name__, self.name, id(self)
+
def c_name(self):
return c_name(self.name)