)]}'
{
  "commit": "7540cc2ec0a5c29306ed852483f833c61eddf133",
  "tree": "493c1837b51458408661edef6492c38203cb881a",
  "parents": [
    "c67076d653f7501136f7b208df4b011a7275e8f5"
  ],
  "author": {
    "name": "Adam Langley",
    "email": "agl@google.com",
    "time": "Thu Apr 18 09:56:13 2019 -0700"
  },
  "committer": {
    "name": "CQ bot account: commit-bot@chromium.org",
    "email": "commit-bot@chromium.org",
    "time": "Mon Apr 22 21:49:12 2019 +0000"
  },
  "message": "Predeclare enums in base.h\n\nIncluding ssl.h is quite a chunk of code and #defines, so we\u0027ve tried to\nlimit its spread internally in the interests of code hygine given that\nwe have a multi-billion-line repo.\n\nHowever, header files that mention enums from ssl.h currently need to\ninclude ssl.h. For example, your class may have static class member\nfunctions intended to be callbacks, and they need to be class members\nbecause they\u0027ll call other private methods.\n\nC cannot predeclare enums, but C++ can if you explicitly type them.\nSadly C doesn\u0027t support explicit types. So option one is to move the\nenums into base.h. That works, but the enums properly live in ssl.h and\nreading the header file is a lot clearer if you don\u0027t have to jump\naround to see all the pieces.\n\nSo option two (this change) is to explicitly type and predelcare the\nenums in base.h for C++ only. The worry now is that C and C++ might\ndisagree about the type of the enums. However, this has already\nhappened: at least for |ssl_private_key_result_t|, g++ thinks that it\u0027s\nan |int| (without any explicit type) and gcc thinks that it\u0027s an\n|unsigned|. At least they\u0027re the same length, I guess?\n\nSo, to make sure that this doesn\u0027t slip any more, this change also adds\n|ssl_test_c.c| which tests that C views the enums as having the same\nsize as an |int|, at least.\n\nChange-Id: I8248583ec997021f8226d5a798609f6afc96dac4\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/35664\nReviewed-by: Adam Langley \u003cagl@google.com\u003e\nReviewed-by: David Benjamin \u003cdavidben@google.com\u003e\nCommit-Queue: Adam Langley \u003cagl@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7fe232f3b486347f97a249cd0f0896356e50e0c2",
      "old_mode": 33188,
      "old_path": "include/openssl/base.h",
      "new_id": "41e9305f0acdbf18f74f000d21d929c14c3c8da7",
      "new_mode": 33188,
      "new_path": "include/openssl/base.h"
    },
    {
      "type": "modify",
      "old_id": "4240c29abb173fc974b3400388e557a4d93475da",
      "old_mode": 33188,
      "old_path": "include/openssl/ssl.h",
      "new_id": "8e020847e2a025270859263d3063409b5910e77f",
      "new_mode": 33188,
      "new_path": "include/openssl/ssl.h"
    },
    {
      "type": "modify",
      "old_id": "dc89dcaa516c0b729c657ffaebe4d3ceac971487",
      "old_mode": 33188,
      "old_path": "ssl/CMakeLists.txt",
      "new_id": "0fb532eae616f93ffcb117ccc01b895efa0fc5b4",
      "new_mode": 33188,
      "new_path": "ssl/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "02f8655dc5e676be0405cdf35045aff5b21c60b3",
      "new_mode": 33188,
      "new_path": "ssl/ssl_c_test.c"
    },
    {
      "type": "modify",
      "old_id": "d01b6495db48cc59caf347dfed564e9a23a9a1ad",
      "old_mode": 33188,
      "old_path": "ssl/ssl_test.cc",
      "new_id": "0ff1867103df310c4439217ef93b01de26f02078",
      "new_mode": 33188,
      "new_path": "ssl/ssl_test.cc"
    }
  ]
}
