Upgrade linux protobuf from 3.19.1 -> 21.12

This commit is contained in:
John Colvin committed 2023-03-18 15:31:41 -04:00
1 parent 4a3e40193e
commit 01a4bb004a
554 files changed
+34981 -37969

No files matched your search

@@ -56,7 +56,7 @@ PyDescriptorDatabase::~PyDescriptorDatabase() { Py_DECREF(py_database_); }
// Handles all kinds of Python errors, which are simply logged.
static bool GetFileDescriptorProto(PyObject* py_descriptor,
FileDescriptorProto* output) {
if (py_descriptor == NULL) {
if (py_descriptor == nullptr) {
if (PyErr_ExceptionMatches(PyExc_KeyError)) {
// Expected error: item was simply not found.
PyErr_Clear();
@@ -83,8 +83,8 @@ static bool GetFileDescriptorProto(PyObject* py_descriptor,
// Slow path: serialize the message. This allows to use databases which
// use a different implementation of FileDescriptorProto.
ScopedPyObjectPtr serialized_pb(
PyObject_CallMethod(py_descriptor, "SerializeToString", NULL));
if (serialized_pb == NULL) {
PyObject_CallMethod(py_descriptor, "SerializeToString", nullptr));
if (serialized_pb == nullptr) {
GOOGLE_LOG(ERROR)
<< "DescriptorDatabase method did not return a FileDescriptorProto";
PyErr_Print();
@@ -134,7 +134,7 @@ bool PyDescriptorDatabase::FindFileContainingExtension(
FileDescriptorProto* output) {
ScopedPyObjectPtr py_method(
PyObject_GetAttrString(py_database_, "FindFileContainingExtension"));
if (py_method == NULL) {
if (py_method == nullptr) {
// This method is not implemented, returns without error.
PyErr_Clear();
return false;
@@ -153,7 +153,7 @@ bool PyDescriptorDatabase::FindAllExtensionNumbers(
const std::string& containing_type, std::vector<int>* output) {
ScopedPyObjectPtr py_method(
PyObject_GetAttrString(py_database_, "FindAllExtensionNumbers"));
if (py_method == NULL) {
if (py_method == nullptr) {
// This method is not implemented, returns without error.
PyErr_Clear();
return false;
@@ -161,7 +161,7 @@ bool PyDescriptorDatabase::FindAllExtensionNumbers(
ScopedPyObjectPtr py_list(
PyObject_CallFunction(py_method.get(), "s#", containing_type.c_str(),
containing_type.size()));
if (py_list == NULL) {
if (py_list == nullptr) {
PyErr_Print();
return false;
}