From d91c1a1e82e74433f893d33a8d1d7de1748794ca Mon Sep 17 00:00:00 2001 From: Jean-Roland Date: Mon, 10 Jun 2024 11:34:56 +0200 Subject: [PATCH] feat: rename collections/bytes to slice --- include/zenoh-pico/api/types.h | 2 +- include/zenoh-pico/collections/{bytes.h => slice.h} | 6 +++--- include/zenoh-pico/collections/string.h | 2 +- include/zenoh-pico/net/encoding.h | 2 +- include/zenoh-pico/protocol/core.h | 2 +- include/zenoh-pico/protocol/definitions/network.h | 2 +- include/zenoh-pico/protocol/iobuf.h | 2 +- include/zenoh-pico/transport/manager.h | 2 +- include/zenoh-pico/transport/transport.h | 2 +- src/api/api.c | 2 +- src/collections/{bytes.c => slice.c} | 2 +- src/net/primitives.c | 2 +- src/net/session.c | 2 +- src/protocol/codec/ext.c | 2 +- src/protocol/codec/message.c | 2 +- src/protocol/codec/network.c | 2 +- src/protocol/codec/transport.c | 2 +- src/protocol/core.c | 2 +- src/protocol/definitions/message.c | 2 +- src/protocol/definitions/transport.c | 2 +- src/protocol/ext.c | 2 +- src/session/push.c | 2 +- src/session/rx.c | 2 +- src/system/arduino/esp32/network.cpp | 2 +- src/system/espidf/network.c | 2 +- tests/z_msgcodec_test.c | 2 +- tests/z_peer_multicast_test.c | 2 +- 27 files changed, 29 insertions(+), 29 deletions(-) rename include/zenoh-pico/collections/{bytes.h => slice.h} (92%) rename src/collections/{bytes.c => slice.c} (98%) diff --git a/include/zenoh-pico/api/types.h b/include/zenoh-pico/api/types.h index 1e78a5ffe..def1e428e 100644 --- a/include/zenoh-pico/api/types.h +++ b/include/zenoh-pico/api/types.h @@ -15,9 +15,9 @@ #ifndef INCLUDE_ZENOH_PICO_API_TYPES_H #define INCLUDE_ZENOH_PICO_API_TYPES_H -#include "zenoh-pico/collections/bytes.h" #include "zenoh-pico/collections/element.h" #include "zenoh-pico/collections/list.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/collections/string.h" #include "zenoh-pico/net/encoding.h" #include "zenoh-pico/net/publish.h" diff --git a/include/zenoh-pico/collections/bytes.h b/include/zenoh-pico/collections/slice.h similarity index 92% rename from include/zenoh-pico/collections/bytes.h rename to include/zenoh-pico/collections/slice.h index 981e7ca61..c900eda10 100644 --- a/include/zenoh-pico/collections/bytes.h +++ b/include/zenoh-pico/collections/slice.h @@ -12,8 +12,8 @@ // ZettaScale Zenoh Team, // -#ifndef ZENOH_PICO_COLLECTIONS_BYTES_H -#define ZENOH_PICO_COLLECTIONS_BYTES_H +#ifndef ZENOH_PICO_COLLECTIONS_SLICE_H +#define ZENOH_PICO_COLLECTIONS_SLICE_H #include #include @@ -50,4 +50,4 @@ _Bool _z_slice_eq(const _z_slice_t *left, const _z_slice_t *right); void _z_slice_clear(_z_slice_t *bs); void _z_slice_free(_z_slice_t **bs); -#endif /* ZENOH_PICO_COLLECTIONS_BYTES_H */ +#endif /* ZENOH_PICO_COLLECTIONS_SLICE_H */ diff --git a/include/zenoh-pico/collections/string.h b/include/zenoh-pico/collections/string.h index 4ad48f8cf..e03139cfe 100644 --- a/include/zenoh-pico/collections/string.h +++ b/include/zenoh-pico/collections/string.h @@ -15,10 +15,10 @@ #define ZENOH_PICO_COLLECTIONS_STRING_H #include "zenoh-pico/collections/array.h" -#include "zenoh-pico/collections/bytes.h" #include "zenoh-pico/collections/element.h" #include "zenoh-pico/collections/intmap.h" #include "zenoh-pico/collections/list.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/collections/vec.h" /*-------- str --------*/ diff --git a/include/zenoh-pico/net/encoding.h b/include/zenoh-pico/net/encoding.h index 41076bcd1..cb17a1622 100644 --- a/include/zenoh-pico/net/encoding.h +++ b/include/zenoh-pico/net/encoding.h @@ -15,7 +15,7 @@ #define ZENOH_PICO_ENCODING_NETAPI_H #include "zenoh-pico/api/constants.h" -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" /** * A zenoh encoding. diff --git a/include/zenoh-pico/protocol/core.h b/include/zenoh-pico/protocol/core.h index bb2643a9c..57cbdf83a 100644 --- a/include/zenoh-pico/protocol/core.h +++ b/include/zenoh-pico/protocol/core.h @@ -20,9 +20,9 @@ #include #include "zenoh-pico/api/constants.h" -#include "zenoh-pico/collections/bytes.h" #include "zenoh-pico/collections/element.h" #include "zenoh-pico/collections/refcount.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/collections/string.h" #include "zenoh-pico/config.h" #include "zenoh-pico/net/encoding.h" diff --git a/include/zenoh-pico/protocol/definitions/network.h b/include/zenoh-pico/protocol/definitions/network.h index dc9b42bb0..28e9f04b8 100644 --- a/include/zenoh-pico/protocol/definitions/network.h +++ b/include/zenoh-pico/protocol/definitions/network.h @@ -18,7 +18,7 @@ #include #include "zenoh-pico/api/constants.h" -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/protocol/core.h" #include "zenoh-pico/protocol/definitions/declarations.h" #include "zenoh-pico/protocol/definitions/interest.h" diff --git a/include/zenoh-pico/protocol/iobuf.h b/include/zenoh-pico/protocol/iobuf.h index f35ade5a3..1f29a9b56 100644 --- a/include/zenoh-pico/protocol/iobuf.h +++ b/include/zenoh-pico/protocol/iobuf.h @@ -19,8 +19,8 @@ #include #include -#include "zenoh-pico/collections/bytes.h" #include "zenoh-pico/collections/element.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/collections/vec.h" /*------------------ IOSli ------------------*/ diff --git a/include/zenoh-pico/transport/manager.h b/include/zenoh-pico/transport/manager.h index faac8c25e..f817c2494 100644 --- a/include/zenoh-pico/transport/manager.h +++ b/include/zenoh-pico/transport/manager.h @@ -15,7 +15,7 @@ #ifndef INCLUDE_ZENOH_PICO_TRANSPORT_MANAGER_H #define INCLUDE_ZENOH_PICO_TRANSPORT_MANAGER_H -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/link/manager.h" #include "zenoh-pico/transport/transport.h" diff --git a/include/zenoh-pico/transport/transport.h b/include/zenoh-pico/transport/transport.h index df565e9b9..d00c3c8de 100644 --- a/include/zenoh-pico/transport/transport.h +++ b/include/zenoh-pico/transport/transport.h @@ -18,8 +18,8 @@ #include #include -#include "zenoh-pico/collections/bytes.h" #include "zenoh-pico/collections/element.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/config.h" #include "zenoh-pico/link/link.h" #include "zenoh-pico/protocol/core.h" diff --git a/src/api/api.c b/src/api/api.c index ffe65b202..67adbbfce 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -20,7 +20,7 @@ #include "zenoh-pico/api/primitives.h" #include "zenoh-pico/api/types.h" -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/config.h" #include "zenoh-pico/net/config.h" #include "zenoh-pico/net/filtering.h" diff --git a/src/collections/bytes.c b/src/collections/slice.c similarity index 98% rename from src/collections/bytes.c rename to src/collections/slice.c index 977868621..c68cc0740 100644 --- a/src/collections/bytes.c +++ b/src/collections/slice.c @@ -12,7 +12,7 @@ // ZettaScale Zenoh Team, // -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include #include diff --git a/src/net/primitives.c b/src/net/primitives.c index 100b481e1..dc1867971 100644 --- a/src/net/primitives.c +++ b/src/net/primitives.c @@ -18,7 +18,7 @@ #include #include "zenoh-pico/api/constants.h" -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/config.h" #include "zenoh-pico/net/filtering.h" #include "zenoh-pico/net/logger.h" diff --git a/src/net/session.c b/src/net/session.c index 9a6a42cec..0300584d2 100644 --- a/src/net/session.c +++ b/src/net/session.c @@ -18,7 +18,7 @@ #include #include "zenoh-pico/api/primitives.h" -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/collections/string.h" #include "zenoh-pico/config.h" #include "zenoh-pico/net/sample.h" diff --git a/src/protocol/codec/ext.c b/src/protocol/codec/ext.c index fa4f03c5e..c1188431e 100644 --- a/src/protocol/codec/ext.c +++ b/src/protocol/codec/ext.c @@ -18,7 +18,7 @@ #include #include -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/protocol/codec.h" #include "zenoh-pico/protocol/codec/ext.h" #include "zenoh-pico/system/platform.h" diff --git a/src/protocol/codec/message.c b/src/protocol/codec/message.c index 8f9d8506c..361e6d75e 100644 --- a/src/protocol/codec/message.c +++ b/src/protocol/codec/message.c @@ -22,7 +22,7 @@ #include "zenoh-pico/api/constants.h" #include "zenoh-pico/api/types.h" -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/link/endpoint.h" #include "zenoh-pico/protocol/codec.h" #include "zenoh-pico/protocol/codec/core.h" diff --git a/src/protocol/codec/network.c b/src/protocol/codec/network.c index fecfdb39a..a676cb595 100644 --- a/src/protocol/codec/network.c +++ b/src/protocol/codec/network.c @@ -20,7 +20,7 @@ #include "zenoh-pico/api/constants.h" #include "zenoh-pico/api/types.h" -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/protocol/codec.h" #include "zenoh-pico/protocol/codec/core.h" #include "zenoh-pico/protocol/codec/declarations.h" diff --git a/src/protocol/codec/transport.c b/src/protocol/codec/transport.c index 082064af2..00cacad9c 100644 --- a/src/protocol/codec/transport.c +++ b/src/protocol/codec/transport.c @@ -17,7 +17,7 @@ #include #include -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/protocol/codec/core.h" #include "zenoh-pico/protocol/codec/ext.h" #include "zenoh-pico/protocol/codec/network.h" diff --git a/src/protocol/core.c b/src/protocol/core.c index 5dae70799..a6e73d134 100644 --- a/src/protocol/core.c +++ b/src/protocol/core.c @@ -19,7 +19,7 @@ #include "zenoh-pico/api/primitives.h" #include "zenoh-pico/api/types.h" -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/protocol/codec/core.h" #include "zenoh-pico/protocol/iobuf.h" #include "zenoh-pico/utils/logging.h" diff --git a/src/protocol/definitions/message.c b/src/protocol/definitions/message.c index cbee59ba1..947a0ec44 100644 --- a/src/protocol/definitions/message.c +++ b/src/protocol/definitions/message.c @@ -16,7 +16,7 @@ #include -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/protocol/core.h" #include "zenoh-pico/protocol/definitions/network.h" diff --git a/src/protocol/definitions/transport.c b/src/protocol/definitions/transport.c index 75b5e061f..2a774f758 100644 --- a/src/protocol/definitions/transport.c +++ b/src/protocol/definitions/transport.c @@ -14,7 +14,7 @@ #include "zenoh-pico/protocol/definitions/transport.h" -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/utils/logging.h" void _z_s_msg_scout_clear(_z_s_msg_scout_t *msg) {} diff --git a/src/protocol/ext.c b/src/protocol/ext.c index 67c4da72e..c40f2d75c 100644 --- a/src/protocol/ext.c +++ b/src/protocol/ext.c @@ -16,7 +16,7 @@ #include -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/utils/logging.h" _z_msg_ext_t _z_msg_ext_make_unit(uint8_t id) { diff --git a/src/session/push.c b/src/session/push.c index 9534e7a11..df197244c 100644 --- a/src/session/push.c +++ b/src/session/push.c @@ -16,7 +16,7 @@ #include "zenoh-pico/api/constants.h" #include "zenoh-pico/api/primitives.h" -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/config.h" #include "zenoh-pico/session/subscription.h" #include "zenoh-pico/utils/logging.h" diff --git a/src/session/rx.c b/src/session/rx.c index 609ecab26..d5d5d8e33 100644 --- a/src/session/rx.c +++ b/src/session/rx.c @@ -18,7 +18,7 @@ #include "zenoh-pico/api/constants.h" #include "zenoh-pico/api/primitives.h" #include "zenoh-pico/api/types.h" -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/protocol/core.h" #include "zenoh-pico/protocol/definitions/declarations.h" #include "zenoh-pico/protocol/definitions/message.h" diff --git a/src/system/arduino/esp32/network.cpp b/src/system/arduino/esp32/network.cpp index d2d2cc0d5..cbfe0360c 100644 --- a/src/system/arduino/esp32/network.cpp +++ b/src/system/arduino/esp32/network.cpp @@ -21,7 +21,7 @@ extern "C" { #include #include -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/collections/string.h" #include "zenoh-pico/config.h" #include "zenoh-pico/system/link/bt.h" diff --git a/src/system/espidf/network.c b/src/system/espidf/network.c index 5beb20181..d60a9a4f4 100644 --- a/src/system/espidf/network.c +++ b/src/system/espidf/network.c @@ -17,7 +17,7 @@ #include #include -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/collections/string.h" #include "zenoh-pico/config.h" #include "zenoh-pico/system/link/bt.h" diff --git a/tests/z_msgcodec_test.c b/tests/z_msgcodec_test.c index 6752886fc..177cfd058 100644 --- a/tests/z_msgcodec_test.c +++ b/tests/z_msgcodec_test.c @@ -26,7 +26,7 @@ #include #include -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/collections/string.h" #include "zenoh-pico/protocol/codec/core.h" #include "zenoh-pico/protocol/codec/declarations.h" diff --git a/tests/z_peer_multicast_test.c b/tests/z_peer_multicast_test.c index 0cf8af45e..c5b84c566 100644 --- a/tests/z_peer_multicast_test.c +++ b/tests/z_peer_multicast_test.c @@ -18,7 +18,7 @@ #include #include "zenoh-pico.h" -#include "zenoh-pico/collections/bytes.h" +#include "zenoh-pico/collections/slice.h" #include "zenoh-pico/protocol/core.h" #undef NDEBUG