Skip to content

Commit

Permalink
fix attachment examples
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisBiryukov91 committed Jun 25, 2024
1 parent cd95ad2 commit c673cd4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/unix/c11/z_get_attachment.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ void parse_attachment(kv_pairs_rx_t *kvp, const z_loaned_bytes_t *attachment) {
z_bytes_iterator_t iter = z_bytes_get_iterator(attachment);

while (kvp->current_idx < kvp->len && z_bytes_iterator_next(&iter, &kv)) {
z_bytes_deserialize_into_pair(z_loan(kv), &first, &second);
z_bytes_deserialize_into_string(z_loan(first), &kvp->data[kvp->current_idx].key);
z_bytes_deserialize_into_string(z_loan(second), &kvp->data[kvp->current_idx].value);
z_bytes_drop(&first);
Expand Down
1 change: 1 addition & 0 deletions examples/unix/c11/z_queryable_attachment.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ void parse_attachment(kv_pairs_rx_t *kvp, const z_loaned_bytes_t *attachment) {
z_bytes_iterator_t iter = z_bytes_get_iterator(attachment);

while (kvp->current_idx < kvp->len && z_bytes_iterator_next(&iter, &kv)) {
z_bytes_deserialize_into_pair(z_loan(kv), &first, &second);
z_bytes_deserialize_into_string(z_loan(first), &kvp->data[kvp->current_idx].key);
z_bytes_deserialize_into_string(z_loan(second), &kvp->data[kvp->current_idx].value);
z_bytes_drop(&first);
Expand Down
1 change: 1 addition & 0 deletions examples/unix/c11/z_sub_attachment.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ void parse_attachment(kv_pairs_t *kvp, const z_loaned_bytes_t *attachment) {
z_bytes_iterator_t iter = z_bytes_get_iterator(attachment);

while (kvp->current_idx < kvp->len && z_bytes_iterator_next(&iter, &kv)) {
z_bytes_deserialize_into_pair(z_loan(kv), &first, &second);
z_bytes_deserialize_into_string(z_loan(first), &kvp->data[kvp->current_idx].key);
z_bytes_deserialize_into_string(z_loan(second), &kvp->data[kvp->current_idx].value);
z_bytes_drop(&first);
Expand Down

0 comments on commit c673cd4

Please sign in to comment.