Skip to content

Commit

Permalink
Rename z_view_str_wrap to z_view_string_wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Jun 10, 2024
1 parent bf495cb commit dac0182
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion examples/arduino/z_get.ino
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void loop() {
// Value encoding
if (strcmp(VALUE, "") != 0) {
z_view_string_t value_str;
z_view_str_wrap(&value_str, VALUE);
z_view_string_wrap(&value_str, VALUE);
z_owned_bytes_t payload;
z_bytes_encode_from_string(&payload, z_view_string_loan(&value_str));
opts.payload = &payload;
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino/z_queryable.ino
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void query_handler(const z_loaned_query_t *query, void *arg) {

// Reply value encoding
z_view_string_t reply_str;
z_view_str_wrap(&reply_str, VALUE);
z_view_string_wrap(&reply_str, VALUE);
z_owned_bytes_t reply_payload;
z_bytes_encode_from_string(&reply_payload, z_view_string_loan(&reply_str));

Expand Down
2 changes: 1 addition & 1 deletion examples/espidf/z_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void app_main() {
// Value encoding
if (strcmp(VALUE, "") != 0) {
z_view_string_t value_str;
z_view_str_wrap(&value_str, VALUE);
z_view_string_wrap(&value_str, VALUE);
z_owned_bytes_t payload;
z_bytes_encode_from_string(&payload, z_loan(value_str));
opts.payload = &payload;
Expand Down
2 changes: 1 addition & 1 deletion examples/espidf/z_queryable.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void query_handler(const z_loaned_query_t *query, void *ctx) {
z_view_keyexpr_from_string_unchecked(&ke, KEYEXPR);
// Reply value encoding
z_view_string_t reply_str;
z_view_str_wrap(&reply_str, VALUE);
z_view_string_wrap(&reply_str, VALUE);
z_owned_bytes_t reply_payload;
z_bytes_encode_from_string(&reply_payload, z_loan(reply_str));

Expand Down
2 changes: 1 addition & 1 deletion examples/freertos_plus_tcp/z_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void app_main(void) {
// Value encoding
if (strcmp(VALUE, "") != 0) {
z_view_string_t value_str;
z_view_str_wrap(&value_str, VALUE);
z_view_string_wrap(&value_str, VALUE);
z_owned_bytes_t payload;
z_bytes_encode_from_string(&payload, z_loan(value_str));
opts.payload = &payload;
Expand Down
2 changes: 1 addition & 1 deletion examples/freertos_plus_tcp/z_queryable.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void query_handler(const z_loaned_query_t *query, void *ctx) {
z_query_reply_options_default(&options);
// Reply value encoding
z_view_string_t reply_str;
z_view_str_wrap(&reply_str, VALUE);
z_view_string_wrap(&reply_str, VALUE);
z_owned_bytes_t reply_payload;
z_bytes_encode_from_string(&reply_payload, z_loan(reply_str));

Expand Down
2 changes: 1 addition & 1 deletion examples/mbed/z_get.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int main(int argc, char **argv) {
// Value encoding
if (strcmp(VALUE, "") != 0) {
z_view_string_t value_str;
z_view_str_wrap(&value_str, VALUE);
z_view_string_wrap(&value_str, VALUE);
z_owned_bytes_t payload;
z_bytes_encode_from_string(&payload, z_view_string_loan(&value_str));
opts.payload = &payload;
Expand Down
2 changes: 1 addition & 1 deletion examples/mbed/z_queryable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void query_handler(const z_loaned_query_t *query, void *ctx) {
}
// Reply value encoding
z_view_string_t reply_str;
z_view_str_wrap(&reply_str, VALUE);
z_view_string_wrap(&reply_str, VALUE);
z_owned_bytes_t reply_payload;
z_bytes_encode_from_string(&reply_payload, z_view_string_loan(&reply_str));

Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ int main(int argc, char **argv) {

if (value != NULL) {
z_view_string_t value_str;
z_view_str_wrap(&value_str, value);
z_view_string_wrap(&value_str, value);
z_owned_bytes_t payload;
z_bytes_encode_from_string(&payload, z_loan(value_str));
opts.payload = &payload;
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_get_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int main(int argc, char **argv) {
// Value encoding
if (value != NULL) {
z_view_string_t value_str;
z_view_str_wrap(&value_str, value);
z_view_string_wrap(&value_str, value);
z_owned_bytes_t payload;
z_bytes_encode_from_string(&payload, z_loan(value_str));
opts.payload = &payload;
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_queryable.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void query_handler(const z_loaned_query_t *query, void *ctx) {

// Reply value encoding
z_view_string_t reply_str;
z_view_str_wrap(&reply_str, value);
z_view_string_wrap(&reply_str, value);
z_owned_bytes_t reply_payload;
z_bytes_encode_from_string(&reply_payload, z_loan(reply_str));

Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_queryable_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ int main(int argc, char **argv) {
z_query_reply_options_default(&options);
// Reply value encoding
z_view_string_t reply_str;
z_view_str_wrap(&reply_str, value);
z_view_string_wrap(&reply_str, value);
z_owned_bytes_t reply_payload;
z_bytes_encode_from_string(&reply_payload, z_loan(reply_str));

Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c99/z_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ int main(int argc, char **argv) {
// Value encoding
if (value != NULL) {
z_view_string_t value_str;
z_view_str_wrap(&value_str, value);
z_view_string_wrap(&value_str, value);
z_owned_bytes_t payload;
z_bytes_encode_from_string(&payload, z_view_string_loan(&value_str));
opts.payload = &payload;
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c99/z_queryable.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void query_handler(const z_loaned_query_t *query, void *ctx) {
options.encoding = z_encoding_move(&encoding);
// Reply value encoding
z_view_string_t reply_str;
z_view_str_wrap(&reply_str, value);
z_view_string_wrap(&reply_str, value);
z_owned_bytes_t reply_payload;
z_bytes_encode_from_string(&reply_payload, z_view_string_loan(&reply_str));

Expand Down
2 changes: 1 addition & 1 deletion examples/windows/z_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ int main(int argc, char **argv) {
// Value encoding
if (value != NULL) {
z_view_string_t value_str;
z_view_str_wrap(&value_str, value);
z_view_string_wrap(&value_str, value);
z_owned_bytes_t payload;
z_bytes_encode_from_string(&payload, z_loan(value_str));
opts.payload = &payload;
Expand Down
2 changes: 1 addition & 1 deletion examples/windows/z_queryable.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void query_handler(const z_loaned_query_t *query, void *ctx) {
options.encoding = z_move(encoding);
// Reply value encoding
z_view_string_t reply_str;
z_view_str_wrap(&reply_str, value);
z_view_string_wrap(&reply_str, value);
z_owned_bytes_t reply_payload;
z_bytes_encode_from_string(&reply_payload, z_loan(reply_str));

Expand Down
2 changes: 1 addition & 1 deletion examples/zephyr/z_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int main(int argc, char **argv) {
// Value encoding
if (strcmp(VALUE, "") != 0) {
z_view_string_t value_str;
z_view_str_wrap(&value_str, VALUE);
z_view_string_wrap(&value_str, VALUE);
z_owned_bytes_t payload;
z_bytes_encode_from_string(&payload, z_loan(value_str));
opts.payload = &payload;
Expand Down
2 changes: 1 addition & 1 deletion examples/zephyr/z_queryable.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void query_handler(const z_loaned_query_t *query, void *ctx) {
}
// Reply value encoding
z_view_string_t reply_str;
z_view_str_wrap(&reply_str, VALUE);
z_view_string_wrap(&reply_str, VALUE);
z_owned_bytes_t reply_payload;
z_bytes_encode_from_string(&reply_payload, z_loan(reply_str));

Expand Down
2 changes: 1 addition & 1 deletion include/zenoh-pico/api/primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extern "C" {
* Return:
* ``0`` if creation successful, ``negative value`` otherwise.
*/
int8_t z_view_str_wrap(z_view_string_t *str, const char *value);
int8_t z_view_string_wrap(z_view_string_t *str, const char *value);

/**
* Builds a :c:type:`z_keyexpr_t` from a null-terminated string.
Expand Down
2 changes: 1 addition & 1 deletion src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

/********* Data Types Handlers *********/

int8_t z_view_str_wrap(z_view_string_t *str, const char *value) {
int8_t z_view_string_wrap(z_view_string_t *str, const char *value) {
str->_val = _z_string_wrap((char *)value);
return _Z_RES_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/z_api_alignment_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void query_handler(const z_loaned_query_t *query, void *arg) {

// Reply value encoding
z_view_string_t reply_str;
z_view_str_wrap(&reply_str, value);
z_view_string_wrap(&reply_str, value);
z_owned_bytes_t reply_payload;
z_bytes_encode_from_string(&reply_payload, z_loan(reply_str));

Expand Down
2 changes: 1 addition & 1 deletion tests/z_client_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void query_handler(const z_loaned_query_t *query, void *arg) {

// Reply value encoding
z_view_string_t reply_str;
z_view_str_wrap(&reply_str, res);
z_view_string_wrap(&reply_str, res);
z_owned_bytes_t reply_payload;
z_bytes_encode_from_string(&reply_payload, z_loan(reply_str));

Expand Down

0 comments on commit dac0182

Please sign in to comment.