Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Packed repeated fields are always LENGTH_DELIMITED
  • Loading branch information
Geoffrey Broadwell committed Nov 23, 2013
1 parent 60c6698 commit 34fcd84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/PB/Binary/Writer.pm
Expand Up @@ -171,8 +171,9 @@ sub write-message(buf8 $buffer, Int $offset is rw, PB::Message $message) is expo
next unless @$value;

# Packed repeated: field-key, length, array of values
write-varint($buffer, $offset,
encode-field-key($field-tag, $wire-type));
my $field-key = encode-field-key($field-tag,
WireType::LENGTH_DELIMITED);
write-varint($buffer, $offset, $field-key);

given $wire-type {
when WireType::FIXED_32 {
Expand Down

0 comments on commit 34fcd84

Please sign in to comment.