From 4f9aeee6c7414bec2e1d8a9d3508dbd21f4d3394 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Mon, 14 Feb 2011 10:24:33 -0800 Subject: More completely fixed the 0-key thing. Unfortunately this degrades hash table lookup performance by about 8%, which affects the streaming benchmark for googlemessage1 by about 5%. We could get this back at the cost of some memory, but it would be nice to avoid that. --- src/upb_def.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/upb_def.c') diff --git a/src/upb_def.c b/src/upb_def.c index 879f1e8..7e962c8 100644 --- a/src/upb_def.c +++ b/src/upb_def.c @@ -476,12 +476,6 @@ static upb_flow_t upb_enumdef_EnumValueDescriptorProto_value(void *_b, break; case GOOGLE_PROTOBUF_ENUMVALUEDESCRIPTORPROTO_NUMBER_FIELDNUM: b->number = upb_value_getint32(val); - if (b->number == 0) { - upb_seterr(&b->status, UPB_ERROR, - "Enums with a value of 0 are currently broken; see " - "http://code.google.com/p/upb/issues/detail?id=1."); - return UPB_BREAK; - } b->saw_number = true; break; default: -- cgit v1.2.3