)]}'
{
  "commit": "764af878259768bb70c65bdf3f3285c2d6409bbd",
  "tree": "bf3bc2a132a945048a154717a02f7f1f9b19048d",
  "parents": [
    "72476aca8f585a026a54cf71ccdf7bed26db1903"
  ],
  "author": {
    "name": "Tom Tromey",
    "email": "tom@tromey.com",
    "time": "Wed Jun 12 18:58:49 2024 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Wed Jun 12 18:58:49 2024 +0200"
  },
  "message": "[gdb/python] Add typesafe wrapper around PyObject_CallMethod\n\nIn gdb/python/py-tui.c we have code like this:\n...\n      gdbpy_ref\u003c\u003e result (PyObject_CallMethod (m_window.get(), \"hscroll\",\n                                              \"i\", num_to_scroll, nullptr));\n...\n\nThe nullptr is superfluous, the format string already indicates that there\u0027s\nonly one method argument.\n\nOTOH, passing no method args does use a nullptr:\n...\n      gdbpy_ref\u003c\u003e result (PyObject_CallMethod (m_window.get (), \"render\",\n                                               nullptr));\n...\n\nFurthermore, choosing the right format string chars can be tricky.\n\nAdd a typesafe wrapper around PyObject_CallMethod that hides these\ndetails, such that we can use the more intuitive:\n...\n      gdbpy_ref\u003c\u003e result (gdbpy_call_method (m_window.get(), \"hscroll\",\n                                             num_to_scroll));\n...\nand:\n...\n      gdbpy_ref\u003c\u003e result (gdbpy_call_method (m_window.get (), \"render\"));\n...\n\nTested on x86_64-linux.\n\nCo-Authored-By: Tom de Vries \u003ctdevries@suse.de\u003e\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "da74d69d35773f48352d2ee08286d6faf9a8434a",
      "old_mode": 33188,
      "old_path": "gdb/python/py-breakpoint.c",
      "new_id": "1b8c7174d344d23f0a3831f679f59a71b95f82a6",
      "new_mode": 33188,
      "new_path": "gdb/python/py-breakpoint.c"
    },
    {
      "type": "modify",
      "old_id": "9337514acba831c9e9aae97a56e1fefdd99793d7",
      "old_mode": 33188,
      "old_path": "gdb/python/py-disasm.c",
      "new_id": "5206c7628f562ee551ce3f5d735e72bfe414e8da",
      "new_mode": 33188,
      "new_path": "gdb/python/py-disasm.c"
    },
    {
      "type": "modify",
      "old_id": "c74a2473a8153dba493af38ec9fa87c8d0df2cbc",
      "old_mode": 33188,
      "old_path": "gdb/python/py-finishbreakpoint.c",
      "new_id": "1b620e6d30ed8dd68aa09d6873b0ed81d5de7eea",
      "new_mode": 33188,
      "new_path": "gdb/python/py-finishbreakpoint.c"
    },
    {
      "type": "modify",
      "old_id": "0cd15977d2ff0f6af4de0a3a1a6f5156d246de45",
      "old_mode": 33188,
      "old_path": "gdb/python/py-framefilter.c",
      "new_id": "4ae583b4331b23375b5ee78dadbc1ce5eaa42bcb",
      "new_mode": 33188,
      "new_path": "gdb/python/py-framefilter.c"
    },
    {
      "type": "modify",
      "old_id": "5dcec4bd2b11cf82c33c56b7c1cf7de2e9a51924",
      "old_mode": 33188,
      "old_path": "gdb/python/py-tui.c",
      "new_id": "9df86df8c40638b9b4f210b004fbf5916831215a",
      "new_mode": 33188,
      "new_path": "gdb/python/py-tui.c"
    },
    {
      "type": "modify",
      "old_id": "d07f239ca655815a7f383c429731324143885879",
      "old_mode": 33188,
      "old_path": "gdb/python/python-internal.h",
      "new_id": "1ebb5315a2aa40701fd0157347a1ec99d9e882f3",
      "new_mode": 33188,
      "new_path": "gdb/python/python-internal.h"
    }
  ]
}
