Skip to content

Commit

Permalink
specify return type for encoding function-constant
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisBiryukov91 committed Sep 20, 2024
1 parent 29d4a2a commit cbc6954
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/z_bytes.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int main(void) {
assert(input_u32 == output_u32);
z_drop(z_move(payload));
// Corresponding encoding to be used in operations options like `z_put()`, `z_get()`, etc.
// encoding = z_encoding_zenoh_uint32();
// const z_loaned_encoding_t *encoding = z_encoding_zenoh_uint32();

// String, also work with and z_owned_string_t
const char *input_str = "test";
Expand All @@ -62,7 +62,7 @@ int main(void) {
z_drop(z_move(payload));
z_drop(z_move(output_string));
// Corresponding encoding to be used in operations options like `z_put()`, `z_get()`, etc.
// encoding = z_encoding_zenoh_string();
// const z_loaned_encoding_t *encoding = z_encoding_zenoh_string();

// Bytes, also work with z_owned_slice_t
const uint8_t input_bytes[] = {1, 2, 3, 4};
Expand All @@ -73,7 +73,7 @@ int main(void) {
z_drop(z_move(payload));
z_drop(z_move(output_bytes));
// Corresponding encoding to be used in operations options like `z_put()`, `z_get()`, etc.
// encoding = z_encoding_zenoh_bytes(); // (the default value)
// const z_loaned_encoding_t *encoding = z_encoding_zenoh_bytes(); // (the default value)

// Writer reader
uint8_t input_writer[] = {0, 1, 2, 3, 4};
Expand Down

0 comments on commit cbc6954

Please sign in to comment.