From 29c2356237fe34a4eb0171e6feafe8fe922ffb71 Mon Sep 17 00:00:00 2001 From: Jean-Roland Date: Thu, 25 Apr 2024 11:32:04 +0200 Subject: [PATCH] fix: replace private function _z_bytes_wrap --- examples/unix/c11/z_get.c | 2 +- examples/unix/c11/z_put.c | 2 +- examples/unix/c11/z_queryable.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/unix/c11/z_get.c b/examples/unix/c11/z_get.c index beedc9bf7..d6c4f8ead 100644 --- a/examples/unix/c11/z_get.c +++ b/examples/unix/c11/z_get.c @@ -132,7 +132,7 @@ int main(int argc, char **argv) { } #if Z_FEATURE_ATTACHMENT == 1 z_owned_bytes_map_t map = z_bytes_map_new(); - z_bytes_map_insert_by_alias(&map, _z_bytes_wrap((uint8_t *)"hi", 2), _z_bytes_wrap((uint8_t *)"there", 5)); + z_bytes_map_insert_by_alias(&map, z_bytes_from_str("hi"), z_bytes_from_str("there")); opts.attachment = z_bytes_map_as_attachment(&map); #endif z_owned_closure_reply_t callback = z_closure(reply_handler, reply_dropper); diff --git a/examples/unix/c11/z_put.c b/examples/unix/c11/z_put.c index 19c6b051a..ecf715104 100644 --- a/examples/unix/c11/z_put.c +++ b/examples/unix/c11/z_put.c @@ -99,7 +99,7 @@ int main(int argc, char **argv) { options.encoding = z_encoding(Z_ENCODING_PREFIX_TEXT_PLAIN, NULL); #if Z_FEATURE_ATTACHMENT == 1 z_owned_bytes_map_t map = z_bytes_map_new(); - z_bytes_map_insert_by_alias(&map, _z_bytes_wrap((uint8_t *)"hi", 2), _z_bytes_wrap((uint8_t *)"there", 5)); + z_bytes_map_insert_by_alias(&map, z_bytes_from_str("hi"), z_bytes_from_str("there")); options.attachment = z_bytes_map_as_attachment(&map); #endif if (z_put(z_loan(s), z_keyexpr(keyexpr), (const uint8_t *)value, strlen(value), &options) < 0) { diff --git a/examples/unix/c11/z_queryable.c b/examples/unix/c11/z_queryable.c index 1073d4995..d9a794438 100644 --- a/examples/unix/c11/z_queryable.c +++ b/examples/unix/c11/z_queryable.c @@ -54,7 +54,7 @@ void query_handler(const z_query_t *query, void *ctx) { #if Z_FEATURE_ATTACHMENT == 1 // Add attachment z_owned_bytes_map_t map = z_bytes_map_new(); - z_bytes_map_insert_by_alias(&map, _z_bytes_wrap((uint8_t *)"hello", 5), _z_bytes_wrap((uint8_t *)"world", 5)); + z_bytes_map_insert_by_alias(&map, z_bytes_from_str("hello"), z_bytes_from_str("world")); options.attachment = z_bytes_map_as_attachment(&map); #endif