)]}'
{
  "commit": "88d4ef8b5cbf9d3336564b1d3ac7a91cbe4aee0e",
  "tree": "341b8f7d44ba916ebe75f36ce5d028a6c4458e03",
  "parents": [
    "61a946611b77b05936c60775eaaef87b65ec9f09"
  ],
  "author": {
    "name": "Eric Blake",
    "email": "eblake@redhat.com",
    "time": "Wed Nov 18 01:52:50 2015 -0700"
  },
  "committer": {
    "name": "Markus Armbruster",
    "email": "armbru@redhat.com",
    "time": "Thu Dec 17 08:21:27 2015 +0100"
  },
  "message": "qapi: Track owner of each object member\n\nFuture commits will migrate semantic checking away from parsing\nand over to the various QAPISchema*.check() methods.  But to\nreport an error message about an incorrect semantic use of a\nmember of an object type, it helps to know which type, command,\nor event owns the member.  In particular, when a member is\ninherited from a base type, it is desirable to associate the\nmember name with the base type (and not the type calling\nmember.check()).\n\nRather than packing additional information into the seen array\npassed to each member.check() (as in seen[m.name] \u003d {\u0027member\u0027:m,\n\u0027owner\u0027:type}), it is easier to have each member track the name\nof the owner type in the first place (keeping things simpler\nwith the existing seen[m.name] \u003d m).  The new member.owner field\nis set via a new set_owner() method, called when registering\nthe members and variants arrays with an object or variant type.\nTrack only a name, and not the actual type object, to avoid\ncreating a circular python reference chain.\n\nNote that Variants.set_owner() method does not set the owner\nfor the tag_member field; this field is set earlier either as\npart of an object\u0027s non-variant members, or explicitly by\nalternates.\n\nThe source information is intended for human consumption in\nerror messages, and a new describe() method is added to access\nthe resulting information.  For example, given the qapi:\n  { \u0027command\u0027: \u0027foo\u0027, \u0027data\u0027: { \u0027string\u0027: \u0027str\u0027 } }\nan implementation of visit_command() that calls\n  arg_type.members[0].describe()\nwill see \"\u0027string\u0027 (parameter of foo)\".\n\nTo make the human-readable name of implicit types work without\nduplicating efforts, the describe() method has to reverse the\nname of implicit types, via the helper _pretty_owner().\n\nNo change to generated code.\n\nSigned-off-by: Eric Blake \u003ceblake@redhat.com\u003e\nMessage-Id: \u003c1447836791-369-16-git-send-email-eblake@redhat.com\u003e\n[Incorrect \u0026 unused -wrapper case in _pretty_owner() dropped]\nSigned-off-by: Markus Armbruster \u003carmbru@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6fc14beaa095528e43c0590aecb49272ae9f6602",
      "old_mode": 33188,
      "old_path": "scripts/qapi.py",
      "new_id": "77d3e0a34afc2cbee8a47b3ce25130e6ecf7cb4c",
      "new_mode": 33188,
      "new_path": "scripts/qapi.py"
    }
  ]
}
