)]}'
{
  "commit": "a16954b8a7d66169760fb60dd7f3d4e400a5e98c",
  "tree": "3cf55b6ab53091088fbd49dd70645711cf78476e",
  "parents": [
    "e32ac7978df02fae0cbbd92bb65d0d50ea4d2df5"
  ],
  "author": {
    "name": "Ian Lance Taylor",
    "email": "iant@golang.org",
    "time": "Fri Oct 14 14:53:59 2016 -0700"
  },
  "committer": {
    "name": "Ian Lance Taylor",
    "email": "iant@golang.org",
    "time": "Wed Oct 19 21:20:50 2016 +0000"
  },
  "message": "cmd/cgo: always use a function literal for pointer checking\n\nThe pointer checking code needs to know the exact type of the parameter\nexpected by the C function, so that it can use a type assertion to\nconvert the empty interface returned by cgoCheckPointer to the correct\ntype. Previously this was done by using a type conversion, but that\nmeant that the code accepted arguments that were convertible to the\nparameter type, rather than arguments that were assignable as in a\nnormal function call. In other words, some code that should not have\npassed type checking was accepted.\n\nThis CL changes cgo to always use a function literal for pointer\nchecking. Now the argument is passed to the function literal, which has\nthe correct argument type, so type checking is performed just as for a\nfunction call as it should be.\n\nSince we now always use a function literal, simplify the checking code\nto run as a statement by itself. It now no longer needs to return a\nvalue, and we no longer need a type assertion.\n\nThis does have the cost of introducing another function call into any\ncall to a C function that requires pointer checking, but the cost of the\nadditional call should be minimal compared to the cost of pointer\nchecking.\n\nFixes #16591.\n\nChange-Id: I220165564cf69db9fd5f746532d7f977a5b2c989\nReviewed-on: https://go-review.googlesource.com/31233\nRun-TryBot: Ian Lance Taylor \u003ciant@golang.org\u003e\nTryBot-Result: Gobot Gobot \u003cgobot@golang.org\u003e\nReviewed-by: Matthew Dempsky \u003cmdempsky@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "10eb8403cf8efa3330070f5a09c1a387b5085a16",
      "new_mode": 33188,
      "new_path": "misc/cgo/errors/issue16591.go"
    },
    {
      "type": "modify",
      "old_id": "84d44d8a338443d65683412ec4a454d9bc58c948",
      "old_mode": 33261,
      "old_path": "misc/cgo/errors/test.bash",
      "new_id": "cb442507a6470b57be58aa9eaf58ccec3e66dde0",
      "new_mode": 33261,
      "new_path": "misc/cgo/errors/test.bash"
    },
    {
      "type": "modify",
      "old_id": "21d1df59eddcbf84edd62f670060a9e4b5388168",
      "old_mode": 33188,
      "old_path": "misc/cgo/test/callback.go",
      "new_id": "b88bf134bc1e40a73109259155da0904f47621a8",
      "new_mode": 33188,
      "new_path": "misc/cgo/test/callback.go"
    },
    {
      "type": "modify",
      "old_id": "5df94ac54e7e2aa0ce98f06044f5bb4662a0be88",
      "old_mode": 33188,
      "old_path": "src/cmd/cgo/gcc.go",
      "new_id": "714d6360ccb5b49fb22eb1722d7af10c10e6db70",
      "new_mode": 33188,
      "new_path": "src/cmd/cgo/gcc.go"
    },
    {
      "type": "modify",
      "old_id": "e0b9cc46a87c532c4ae8a70b0ab6c305d4357ce7",
      "old_mode": 33188,
      "old_path": "src/cmd/cgo/out.go",
      "new_id": "25031c8d48c4ec1186b919eb931282ca37191ab3",
      "new_mode": 33188,
      "new_path": "src/cmd/cgo/out.go"
    },
    {
      "type": "modify",
      "old_id": "7d358b3346abe213cfd33b20e8db77afbe7d7431",
      "old_mode": 33188,
      "old_path": "src/runtime/cgocall.go",
      "new_id": "4542cb7b098ece1d0946d3cd7b8d3159a62a7704",
      "new_mode": 33188,
      "new_path": "src/runtime/cgocall.go"
    }
  ]
}
