From 51fd2d4d2d15f7cf8ea61e802e34d6fd58b62000 Mon Sep 17 00:00:00 2001 From: Denis Biryukov Date: Thu, 12 Sep 2024 16:12:54 +0200 Subject: [PATCH] fix z_id_to_string signature --- include/zenoh-pico/api/primitives.h | 2 +- src/api/api.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/zenoh-pico/api/primitives.h b/include/zenoh-pico/api/primitives.h index 529fbfc26..29a935306 100644 --- a/include/zenoh-pico/api/primitives.h +++ b/include/zenoh-pico/api/primitives.h @@ -1585,7 +1585,7 @@ z_id_t z_info_zid(const z_loaned_session_t *zs); * Return: * ``0`` if operation successful, ``negative value`` otherwise. */ -z_result_t z_id_to_string(z_id_t *id, z_owned_string_t *str); +z_result_t z_id_to_string(const z_id_t *id, z_owned_string_t *str); /** * Gets the keyexpr from a sample by aliasing it. diff --git a/src/api/api.c b/src/api/api.c index 2bd60f512..d0acc3503 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -991,7 +991,7 @@ int8_t z_info_routers_zid(const z_loaned_session_t *zs, z_moved_closure_zid_t *c z_id_t z_info_zid(const z_loaned_session_t *zs) { return _Z_RC_IN_VAL(zs)->_local_zid; } -z_result_t z_id_to_string(z_id_t *id, z_owned_string_t *str) { +z_result_t z_id_to_string(const z_id_t *id, z_owned_string_t *str) { _z_slice_t buf = _z_slice_alias_buf(id->id, sizeof(id->id)); str->_val = _z_string_convert_bytes(&buf); if (!_z_string_check(&str->_val)) {