Skip to content

Commit

Permalink
Update BinaryProtocolExtensions.md
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine Pitrou <[email protected]>
  • Loading branch information
alkis and pitrou committed Sep 11, 2024
1 parent 879cc6a commit 4e8672e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions BinaryProtocolExtensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ void AppendUleb(uint32_t x, std::string* out) {
};

std::string AppendExtension(std::string thrift, const std::string& ext) {
assert(thrift.back() == '\x00'); // there was a stop field in the first place
thrift.back() = '\x08'; // replace stop field with binary type
AppendUleb(32767, &thrift); // field-id
AppendUleb(ext.size(), &thrift);
Expand Down

0 comments on commit 4e8672e

Please sign in to comment.