Removed unnecessary struct definition with "int a".

pull/13171/head
Josh Haberman 7 years ago
parent 4a7bc85d72
commit a4db175929
  1. 81
      google/protobuf/descriptor.upb.h
  2. 7
      tools/make_c_api.lua

@ -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 */

@ -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.

Loading…
Cancel
Save