203 lines
6.4 KiB
Diff
203 lines
6.4 KiB
Diff
|
|
From ad48868dfe77592c4bacf936ade208f384a26b09 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Robert Edmonds <edmonds@users.noreply.github.com>
|
||
|
|
Date: Sun, 2 Jul 2023 17:48:18 -0400
|
||
|
|
Subject: [PATCH] protoc-c: Remove GOOGLE_DISALLOW_EVIL_CONSTRUCTORS macro
|
||
|
|
invocations
|
||
|
|
|
||
|
|
protobuf has removed the definition of this macro as of commit
|
||
|
|
1595417dd3859bbff7d3d61ad0b6e39044d47489, so the invocation of this
|
||
|
|
macro in protobuf-c breaks the build when building agaist the protobuf
|
||
|
|
22.x or 23.x series.
|
||
|
|
|
||
|
|
Simply removing the macro invocations seems to be safe and doesn't break
|
||
|
|
the build on Debian's protobuf 3.21.12 nor Debian's protobuf 3.6.1.3.
|
||
|
|
---
|
||
|
|
protoc-c/c_bytes_field.h | 2 --
|
||
|
|
protoc-c/c_enum.h | 2 --
|
||
|
|
protoc-c/c_enum_field.h | 2 --
|
||
|
|
protoc-c/c_extension.h | 2 --
|
||
|
|
protoc-c/c_field.h | 5 -----
|
||
|
|
protoc-c/c_file.h | 2 --
|
||
|
|
protoc-c/c_generator.h | 3 ---
|
||
|
|
protoc-c/c_message.h | 2 --
|
||
|
|
protoc-c/c_message_field.h | 4 ----
|
||
|
|
protoc-c/c_primitive_field.h | 4 ----
|
||
|
|
protoc-c/c_service.h | 2 --
|
||
|
|
protoc-c/c_string_field.h | 2 --
|
||
|
|
12 files changed, 32 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/protoc-c/c_bytes_field.h b/protoc-c/c_bytes_field.h
|
||
|
|
index bf873f0..df91ef7 100644
|
||
|
|
--- a/protoc-c/c_bytes_field.h
|
||
|
|
+++ b/protoc-c/c_bytes_field.h
|
||
|
|
@@ -87,8 +87,6 @@ class BytesFieldGenerator : public FieldGenerator {
|
||
|
|
|
||
|
|
private:
|
||
|
|
std::map<std::string, std::string> variables_;
|
||
|
|
-
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(BytesFieldGenerator);
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
diff --git a/protoc-c/c_enum.h b/protoc-c/c_enum.h
|
||
|
|
index 9c34b69..089c336 100644
|
||
|
|
--- a/protoc-c/c_enum.h
|
||
|
|
+++ b/protoc-c/c_enum.h
|
||
|
|
@@ -106,8 +106,6 @@ class EnumGenerator {
|
||
|
|
private:
|
||
|
|
const EnumDescriptor* descriptor_;
|
||
|
|
std::string dllexport_decl_;
|
||
|
|
-
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator);
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace c
|
||
|
|
diff --git a/protoc-c/c_enum_field.h b/protoc-c/c_enum_field.h
|
||
|
|
index 3f8c005..e0c96ad 100644
|
||
|
|
--- a/protoc-c/c_enum_field.h
|
||
|
|
+++ b/protoc-c/c_enum_field.h
|
||
|
|
@@ -85,8 +85,6 @@ class EnumFieldGenerator : public FieldGenerator {
|
||
|
|
|
||
|
|
private:
|
||
|
|
std::map<std::string, std::string> variables_;
|
||
|
|
-
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator);
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
diff --git a/protoc-c/c_extension.h b/protoc-c/c_extension.h
|
||
|
|
index 9541388..bda0bc5 100644
|
||
|
|
--- a/protoc-c/c_extension.h
|
||
|
|
+++ b/protoc-c/c_extension.h
|
||
|
|
@@ -98,8 +98,6 @@ class ExtensionGenerator {
|
||
|
|
const FieldDescriptor* descriptor_;
|
||
|
|
std::string type_traits_;
|
||
|
|
std::string dllexport_decl_;
|
||
|
|
-
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator);
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace c
|
||
|
|
diff --git a/protoc-c/c_field.h b/protoc-c/c_field.h
|
||
|
|
index 3cad35d..623a872 100644
|
||
|
|
--- a/protoc-c/c_field.h
|
||
|
|
+++ b/protoc-c/c_field.h
|
||
|
|
@@ -103,9 +103,6 @@ class FieldGenerator {
|
||
|
|
const std::string &type_macro,
|
||
|
|
const std::string &descriptor_addr) const;
|
||
|
|
const FieldDescriptor *descriptor_;
|
||
|
|
-
|
||
|
|
- private:
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator);
|
||
|
|
};
|
||
|
|
|
||
|
|
// Convenience class which constructs FieldGenerators for a Descriptor.
|
||
|
|
@@ -121,8 +118,6 @@ class FieldGeneratorMap {
|
||
|
|
std::unique_ptr<std::unique_ptr<FieldGenerator>[]> field_generators_;
|
||
|
|
|
||
|
|
static FieldGenerator* MakeGenerator(const FieldDescriptor* field);
|
||
|
|
-
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGeneratorMap);
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace c
|
||
|
|
diff --git a/protoc-c/c_file.h b/protoc-c/c_file.h
|
||
|
|
index 8dfd8ba..db1866c 100644
|
||
|
|
--- a/protoc-c/c_file.h
|
||
|
|
+++ b/protoc-c/c_file.h
|
||
|
|
@@ -103,8 +103,6 @@ class FileGenerator {
|
||
|
|
std::unique_ptr<std::unique_ptr<EnumGenerator>[]> enum_generators_;
|
||
|
|
std::unique_ptr<std::unique_ptr<ServiceGenerator>[]> service_generators_;
|
||
|
|
std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_;
|
||
|
|
-
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator);
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace c
|
||
|
|
diff --git a/protoc-c/c_generator.h b/protoc-c/c_generator.h
|
||
|
|
index ac1ffaf..b8b44aa 100644
|
||
|
|
--- a/protoc-c/c_generator.h
|
||
|
|
+++ b/protoc-c/c_generator.h
|
||
|
|
@@ -93,9 +93,6 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerator {
|
||
|
|
const std::string& parameter,
|
||
|
|
OutputDirectory* output_directory,
|
||
|
|
std::string* error) const;
|
||
|
|
-
|
||
|
|
- private:
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CGenerator);
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace c
|
||
|
|
diff --git a/protoc-c/c_message.h b/protoc-c/c_message.h
|
||
|
|
index ea1c3ab..0d8c644 100644
|
||
|
|
--- a/protoc-c/c_message.h
|
||
|
|
+++ b/protoc-c/c_message.h
|
||
|
|
@@ -136,8 +136,6 @@ class MessageGenerator {
|
||
|
|
std::unique_ptr<std::unique_ptr<MessageGenerator>[]> nested_generators_;
|
||
|
|
std::unique_ptr<std::unique_ptr<EnumGenerator>[]> enum_generators_;
|
||
|
|
std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_;
|
||
|
|
-
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator);
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace c
|
||
|
|
diff --git a/protoc-c/c_message_field.h b/protoc-c/c_message_field.h
|
||
|
|
index 39b8d99..e485921 100644
|
||
|
|
--- a/protoc-c/c_message_field.h
|
||
|
|
+++ b/protoc-c/c_message_field.h
|
||
|
|
@@ -82,10 +82,6 @@ class MessageFieldGenerator : public FieldGenerator {
|
||
|
|
void GenerateDescriptorInitializer(io::Printer* printer) const;
|
||
|
|
std::string GetDefaultValue(void) const;
|
||
|
|
void GenerateStaticInit(io::Printer* printer) const;
|
||
|
|
-
|
||
|
|
- private:
|
||
|
|
-
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator);
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
diff --git a/protoc-c/c_primitive_field.h b/protoc-c/c_primitive_field.h
|
||
|
|
index a9eb893..aa7079f 100644
|
||
|
|
--- a/protoc-c/c_primitive_field.h
|
||
|
|
+++ b/protoc-c/c_primitive_field.h
|
||
|
|
@@ -82,10 +82,6 @@ class PrimitiveFieldGenerator : public FieldGenerator {
|
||
|
|
void GenerateDescriptorInitializer(io::Printer* printer) const;
|
||
|
|
std::string GetDefaultValue(void) const;
|
||
|
|
void GenerateStaticInit(io::Printer* printer) const;
|
||
|
|
-
|
||
|
|
- private:
|
||
|
|
-
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator);
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace c
|
||
|
|
diff --git a/protoc-c/c_service.h b/protoc-c/c_service.h
|
||
|
|
index 27125a6..b51472f 100644
|
||
|
|
--- a/protoc-c/c_service.h
|
||
|
|
+++ b/protoc-c/c_service.h
|
||
|
|
@@ -100,8 +100,6 @@ class ServiceGenerator {
|
||
|
|
|
||
|
|
const ServiceDescriptor* descriptor_;
|
||
|
|
std::map<std::string, std::string> vars_;
|
||
|
|
-
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator);
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace c
|
||
|
|
diff --git a/protoc-c/c_string_field.h b/protoc-c/c_string_field.h
|
||
|
|
index 513cea7..b3a1a7f 100644
|
||
|
|
--- a/protoc-c/c_string_field.h
|
||
|
|
+++ b/protoc-c/c_string_field.h
|
||
|
|
@@ -87,8 +87,6 @@ class StringFieldGenerator : public FieldGenerator {
|
||
|
|
|
||
|
|
private:
|
||
|
|
std::map<std::string, std::string> variables_;
|
||
|
|
-
|
||
|
|
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringFieldGenerator);
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
--
|
||
|
|
2.33.0
|
||
|
|
|