summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2018-09-06 21:58:11 -0700
committerJosh Haberman <jhaberman@gmail.com>2018-09-06 21:58:11 -0700
commita4db17592949bbc22d9c3a97e52d228ba3d3ec81 (patch)
treec851fd6c19760317125cd598b1fd8c5b05090fef
parent4a7bc85d7245a19e7e380e7429011b96287974ec (diff)
Removed unnecessary struct definition with "int a".
-rw-r--r--google/protobuf/descriptor.upb.h81
-rw-r--r--tools/make_c_api.lua7
2 files changed, 60 insertions, 28 deletions
diff --git a/google/protobuf/descriptor.upb.h b/google/protobuf/descriptor.upb.h
index 07ce6f1..7afa8c5 100644
--- a/google/protobuf/descriptor.upb.h
+++ b/google/protobuf/descriptor.upb.h
@@ -16,33 +16,60 @@
#include "upb/port_def.inc"
UPB_BEGIN_EXTERN_C
-typedef struct google_protobuf_FileDescriptorSet { int a; } google_protobuf_FileDescriptorSet;
-typedef struct google_protobuf_FileDescriptorProto { int a; } google_protobuf_FileDescriptorProto;
-typedef struct google_protobuf_DescriptorProto { int a; } google_protobuf_DescriptorProto;
-typedef struct google_protobuf_DescriptorProto_ExtensionRange { int a; } google_protobuf_DescriptorProto_ExtensionRange;
-typedef struct google_protobuf_DescriptorProto_ReservedRange { int a; } google_protobuf_DescriptorProto_ReservedRange;
-typedef struct google_protobuf_ExtensionRangeOptions { int a; } google_protobuf_ExtensionRangeOptions;
-typedef struct google_protobuf_FieldDescriptorProto { int a; } google_protobuf_FieldDescriptorProto;
-typedef struct google_protobuf_OneofDescriptorProto { int a; } google_protobuf_OneofDescriptorProto;
-typedef struct google_protobuf_EnumDescriptorProto { int a; } google_protobuf_EnumDescriptorProto;
-typedef struct google_protobuf_EnumDescriptorProto_EnumReservedRange { int a; } google_protobuf_EnumDescriptorProto_EnumReservedRange;
-typedef struct google_protobuf_EnumValueDescriptorProto { int a; } google_protobuf_EnumValueDescriptorProto;
-typedef struct google_protobuf_ServiceDescriptorProto { int a; } google_protobuf_ServiceDescriptorProto;
-typedef struct google_protobuf_MethodDescriptorProto { int a; } google_protobuf_MethodDescriptorProto;
-typedef struct google_protobuf_FileOptions { int a; } google_protobuf_FileOptions;
-typedef struct google_protobuf_MessageOptions { int a; } google_protobuf_MessageOptions;
-typedef struct google_protobuf_FieldOptions { int a; } google_protobuf_FieldOptions;
-typedef struct google_protobuf_OneofOptions { int a; } google_protobuf_OneofOptions;
-typedef struct google_protobuf_EnumOptions { int a; } google_protobuf_EnumOptions;
-typedef struct google_protobuf_EnumValueOptions { int a; } google_protobuf_EnumValueOptions;
-typedef struct google_protobuf_ServiceOptions { int a; } google_protobuf_ServiceOptions;
-typedef struct google_protobuf_MethodOptions { int a; } google_protobuf_MethodOptions;
-typedef struct google_protobuf_UninterpretedOption { int a; } google_protobuf_UninterpretedOption;
-typedef struct google_protobuf_UninterpretedOption_NamePart { int a; } google_protobuf_UninterpretedOption_NamePart;
-typedef struct google_protobuf_SourceCodeInfo { int a; } google_protobuf_SourceCodeInfo;
-typedef struct google_protobuf_SourceCodeInfo_Location { int a; } google_protobuf_SourceCodeInfo_Location;
-typedef struct google_protobuf_GeneratedCodeInfo { int a; } google_protobuf_GeneratedCodeInfo;
-typedef struct google_protobuf_GeneratedCodeInfo_Annotation { int a; } google_protobuf_GeneratedCodeInfo_Annotation;
+struct google_protobuf_FileDescriptorSet;
+struct google_protobuf_FileDescriptorProto;
+struct google_protobuf_DescriptorProto;
+struct google_protobuf_DescriptorProto_ExtensionRange;
+struct google_protobuf_DescriptorProto_ReservedRange;
+struct google_protobuf_ExtensionRangeOptions;
+struct google_protobuf_FieldDescriptorProto;
+struct google_protobuf_OneofDescriptorProto;
+struct google_protobuf_EnumDescriptorProto;
+struct google_protobuf_EnumDescriptorProto_EnumReservedRange;
+struct google_protobuf_EnumValueDescriptorProto;
+struct google_protobuf_ServiceDescriptorProto;
+struct google_protobuf_MethodDescriptorProto;
+struct google_protobuf_FileOptions;
+struct google_protobuf_MessageOptions;
+struct google_protobuf_FieldOptions;
+struct google_protobuf_OneofOptions;
+struct google_protobuf_EnumOptions;
+struct google_protobuf_EnumValueOptions;
+struct google_protobuf_ServiceOptions;
+struct google_protobuf_MethodOptions;
+struct google_protobuf_UninterpretedOption;
+struct google_protobuf_UninterpretedOption_NamePart;
+struct google_protobuf_SourceCodeInfo;
+struct google_protobuf_SourceCodeInfo_Location;
+struct google_protobuf_GeneratedCodeInfo;
+struct google_protobuf_GeneratedCodeInfo_Annotation;
+typedef struct google_protobuf_FileDescriptorSet google_protobuf_FileDescriptorSet;
+typedef struct google_protobuf_FileDescriptorProto google_protobuf_FileDescriptorProto;
+typedef struct google_protobuf_DescriptorProto google_protobuf_DescriptorProto;
+typedef struct google_protobuf_DescriptorProto_ExtensionRange google_protobuf_DescriptorProto_ExtensionRange;
+typedef struct google_protobuf_DescriptorProto_ReservedRange google_protobuf_DescriptorProto_ReservedRange;
+typedef struct google_protobuf_ExtensionRangeOptions google_protobuf_ExtensionRangeOptions;
+typedef struct google_protobuf_FieldDescriptorProto google_protobuf_FieldDescriptorProto;
+typedef struct google_protobuf_OneofDescriptorProto google_protobuf_OneofDescriptorProto;
+typedef struct google_protobuf_EnumDescriptorProto google_protobuf_EnumDescriptorProto;
+typedef struct google_protobuf_EnumDescriptorProto_EnumReservedRange google_protobuf_EnumDescriptorProto_EnumReservedRange;
+typedef struct google_protobuf_EnumValueDescriptorProto google_protobuf_EnumValueDescriptorProto;
+typedef struct google_protobuf_ServiceDescriptorProto google_protobuf_ServiceDescriptorProto;
+typedef struct google_protobuf_MethodDescriptorProto google_protobuf_MethodDescriptorProto;
+typedef struct google_protobuf_FileOptions google_protobuf_FileOptions;
+typedef struct google_protobuf_MessageOptions google_protobuf_MessageOptions;
+typedef struct google_protobuf_FieldOptions google_protobuf_FieldOptions;
+typedef struct google_protobuf_OneofOptions google_protobuf_OneofOptions;
+typedef struct google_protobuf_EnumOptions google_protobuf_EnumOptions;
+typedef struct google_protobuf_EnumValueOptions google_protobuf_EnumValueOptions;
+typedef struct google_protobuf_ServiceOptions google_protobuf_ServiceOptions;
+typedef struct google_protobuf_MethodOptions google_protobuf_MethodOptions;
+typedef struct google_protobuf_UninterpretedOption google_protobuf_UninterpretedOption;
+typedef struct google_protobuf_UninterpretedOption_NamePart google_protobuf_UninterpretedOption_NamePart;
+typedef struct google_protobuf_SourceCodeInfo google_protobuf_SourceCodeInfo;
+typedef struct google_protobuf_SourceCodeInfo_Location google_protobuf_SourceCodeInfo_Location;
+typedef struct google_protobuf_GeneratedCodeInfo google_protobuf_GeneratedCodeInfo;
+typedef struct google_protobuf_GeneratedCodeInfo_Annotation google_protobuf_GeneratedCodeInfo_Annotation;
/* Enums */
diff --git a/tools/make_c_api.lua b/tools/make_c_api.lua
index cf1cfdc..bf79b26 100644
--- a/tools/make_c_api.lua
+++ b/tools/make_c_api.lua
@@ -343,7 +343,12 @@ local function write_h_file(filedef, append)
-- Forward-declare types defined in this file.
for msg in filedef:defs(upb.DEF_MSG) do
local msgname = to_cident(msg:full_name())
- append('typedef struct %s { int a; } %s;\n', msgname, msgname)
+ append('struct %s;\n', msgname)
+ end
+
+ for msg in filedef:defs(upb.DEF_MSG) do
+ local msgname = to_cident(msg:full_name())
+ append('typedef struct %s %s;\n', msgname, msgname)
end
-- Forward-declare types not in this file, but used as submessages.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback