A couple minor fixes. These are exercised by Ruby.

pull/13171/head
Joshua Haberman 4 years ago
parent 31b3528424
commit 10b355a6e0
  1. 6
      upb/reflection.c

@ -136,7 +136,7 @@ upb_msgval upb_msg_get(const upb_msg *msg, const upb_fielddef *f) {
val.double_val = upb_fielddef_defaultdouble(f); val.double_val = upb_fielddef_defaultdouble(f);
break; break;
case UPB_TYPE_BOOL: case UPB_TYPE_BOOL:
val.double_val = upb_fielddef_defaultbool(f); val.bool_val = upb_fielddef_defaultbool(f);
break; break;
case UPB_TYPE_STRING: case UPB_TYPE_STRING:
case UPB_TYPE_BYTES: case UPB_TYPE_BYTES:
@ -361,6 +361,10 @@ bool upb_map_get(const upb_map *map, upb_msgval key, upb_msgval *val) {
return _upb_map_get(map, &key, map->key_size, val, map->val_size); return _upb_map_get(map, &key, map->key_size, val, map->val_size);
} }
void upb_map_clear(upb_map *map) {
_upb_map_clear(map);
}
bool upb_map_set(upb_map *map, upb_msgval key, upb_msgval val, bool upb_map_set(upb_map *map, upb_msgval key, upb_msgval val,
upb_arena *arena) { upb_arena *arena) {
return _upb_map_set(map, &key, map->key_size, &val, map->val_size, arena); return _upb_map_set(map, &key, map->key_size, &val, map->val_size, arena);

Loading…
Cancel
Save