Small bugfix: enums are int32, not uint32.

pull/13171/head
Joshua Haberman 15 years ago
parent 085aa44fcd
commit 527a544b04
  1. 8
      descriptor/descriptor.h
  2. 2
      tools/upbc.c

@ -303,7 +303,7 @@ struct google_protobuf_FieldOptions {
bool uninterpreted_option:1; /* = 999, repeated. */
} has;
} set_flags;
uint32_t ctype;
int32_t ctype;
bool packed;
bool deprecated;
struct upb_string* experimental_map_key;
@ -326,7 +326,7 @@ struct google_protobuf_FileOptions {
} set_flags;
struct upb_string* java_package;
struct upb_string* java_outer_classname;
uint32_t optimize_for;
int32_t optimize_for;
bool java_multiple_files;
UPB_MSG_ARRAY(google_protobuf_UninterpretedOption)* uninterpreted_option;
};
@ -379,8 +379,8 @@ struct google_protobuf_FieldDescriptorProto {
struct upb_string* name;
struct upb_string* extendee;
int32_t number;
uint32_t label;
uint32_t type;
int32_t label;
int32_t type;
struct upb_string* type_name;
struct upb_string* default_value;
google_protobuf_FieldOptions* options;

@ -225,7 +225,7 @@ static void write_h(struct upb_symtab_entry *entries[], int num_entries,
static char* c_types[] = {
"", "double", "float", "int64_t", "uint64_t", "int32_t", "uint64_t",
"uint32_t", "bool", "struct upb_string*", "", "",
"struct upb_string*", "uint32_t", "uint32_t", "int32_t", "int64_t",
"struct upb_string*", "uint32_t", "int32_t", "int32_t", "int64_t",
"int32_t", "int64_t"
};
fprintf(stream, " %s " UPB_STRFMT ";\n",

Loading…
Cancel
Save