diff --git a/CMakeLists.txt b/CMakeLists.txt index ba8f552b1..05c7a35ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,12 +239,6 @@ set(Z_FEATURE_PUBLISHER_SESSION_CHECK 1 CACHE STRING "Toggle publisher session c set(Z_FEATURE_BATCHING 1 CACHE STRING "Toggle batching") set(Z_FEATURE_RX_CACHE 0 CACHE STRING "Toggle RX_CACHE") -# Add a warning message if someone tries to enable Z_FEATURE_LIVELINESS directly -if(Z_FEATURE_LIVELINESS AND NOT Z_FEATURE_UNSTABLE_API) - message(WARNING "Z_FEATURE_LIVELINESS can only be enabled when Z_FEATURE_UNSTABLE_API is also enabled. Disabling Z_FEATURE_LIVELINESS.") - set(Z_FEATURE_LIVELINESS 0 CACHE STRING "Toggle liveliness feature" FORCE) -endif() - add_compile_definitions("Z_BUILD_DEBUG=$") message(STATUS "Building with feature confing:\n\ * UNSTABLE_API: ${Z_FEATURE_UNSTABLE_API}\n\ diff --git a/include/zenoh-pico/collections/element.h b/include/zenoh-pico/collections/element.h index 5657a63b9..e6a167498 100644 --- a/include/zenoh-pico/collections/element.h +++ b/include/zenoh-pico/collections/element.h @@ -79,8 +79,4 @@ static inline void _z_noop_move(void *dst, void *src) { _Z_ELEM_DEFINE(_z_noop, _z_noop_t, _z_noop_size, _z_noop_clear, _z_noop_copy, _z_noop_move) -#ifdef __cplusplus -} -#endif - #endif /* ZENOH_PICO_COLLECTIONS_ELEMENT_H */ diff --git a/include/zenoh-pico/net/publish.h b/include/zenoh-pico/net/publish.h index b270f4eb3..e54381de4 100644 --- a/include/zenoh-pico/net/publish.h +++ b/include/zenoh-pico/net/publish.h @@ -48,8 +48,4 @@ void _z_publisher_clear(_z_publisher_t *pub); void _z_publisher_free(_z_publisher_t **pub); #endif -#ifdef __cplusplus -} -#endif - #endif /* INCLUDE_ZENOH_PICO_NET_PUBLISH_H */ diff --git a/include/zenoh-pico/net/query.h b/include/zenoh-pico/net/query.h index 433fc1217..676a1c41b 100644 --- a/include/zenoh-pico/net/query.h +++ b/include/zenoh-pico/net/query.h @@ -79,8 +79,4 @@ void _z_queryable_free(_z_queryable_t **qbl); #endif -#ifdef __cplusplus -} -#endif - #endif /* ZENOH_PICO_QUERY_NETAPI_H */ diff --git a/include/zenoh-pico/net/subscribe.h b/include/zenoh-pico/net/subscribe.h index 2357a0c8a..b9d6d8da7 100644 --- a/include/zenoh-pico/net/subscribe.h +++ b/include/zenoh-pico/net/subscribe.h @@ -41,8 +41,4 @@ void _z_subscriber_free(_z_subscriber_t **sub); #endif -#ifdef __cplusplus -} -#endif - #endif /* ZENOH_PICO_SUBSCRIBE_NETAPI_H */ diff --git a/include/zenoh-pico/protocol/codec/network.h b/include/zenoh-pico/protocol/codec/network.h index 661ee9de2..4aca08740 100644 --- a/include/zenoh-pico/protocol/codec/network.h +++ b/include/zenoh-pico/protocol/codec/network.h @@ -40,8 +40,4 @@ z_result_t _z_n_interest_decode(_z_n_msg_interest_t *interest, _z_zbuf_t *zbf, u z_result_t _z_network_message_encode(_z_wbuf_t *wbf, const _z_network_message_t *msg); z_result_t _z_network_message_decode(_z_network_message_t *msg, _z_zbuf_t *zbf, _z_arc_slice_t *arcs); -#ifdef __cplusplus -} -#endif - #endif /* INCLUDE_ZENOH_PICO_PROTOCOL_CODEC_NETWORK_H */ diff --git a/include/zenoh-pico/protocol/definitions/network.h b/include/zenoh-pico/protocol/definitions/network.h index f828d48f1..610ba7fb3 100644 --- a/include/zenoh-pico/protocol/definitions/network.h +++ b/include/zenoh-pico/protocol/definitions/network.h @@ -309,8 +309,4 @@ _z_network_message_t _z_n_msg_make_push(_Z_MOVE(_z_keyexpr_t) key, _Z_MOVE(_z_pu _z_network_message_t _z_n_msg_make_interest(_z_interest_t interest); z_result_t _z_n_msg_copy(_z_network_message_t *dst, const _z_network_message_t *src); -#ifdef __cplusplus -} -#endif - #endif /* INCLUDE_ZENOH_PICO_PROTOCOL_DEFINITIONS_NETWORK_H */ diff --git a/include/zenoh-pico/session/utils.h b/include/zenoh-pico/session/utils.h index 44c48ff91..7b1d3d7af 100644 --- a/include/zenoh-pico/session/utils.h +++ b/include/zenoh-pico/session/utils.h @@ -44,8 +44,4 @@ static inline void _z_session_mutex_lock(_z_session_t *zn) { _ZP_UNUSED(zn); } static inline void _z_session_mutex_unlock(_z_session_t *zn) { _ZP_UNUSED(zn); } #endif -#ifdef __cplusplus -} -#endif - #endif /* INCLUDE_ZENOH_PICO_SESSION_UTILS_H */ diff --git a/include/zenoh-pico/transport/common/tx.h b/include/zenoh-pico/transport/common/tx.h index 6809f20f3..1b8d85d7f 100644 --- a/include/zenoh-pico/transport/common/tx.h +++ b/include/zenoh-pico/transport/common/tx.h @@ -37,8 +37,4 @@ z_result_t _z_send_n_msg(_z_session_t *zn, const _z_network_message_t *n_msg, z_ z_congestion_control_t cong_ctrl); z_result_t _z_send_n_batch(_z_session_t *zn, z_congestion_control_t cong_ctrl); -#ifdef __cplusplus -} -#endif - #endif /* ZENOH_PICO_TRANSPORT_TX_H */ diff --git a/include/zenoh-pico/transport/multicast/rx.h b/include/zenoh-pico/transport/multicast/rx.h index f7a81e00a..83bf77eaf 100644 --- a/include/zenoh-pico/transport/multicast/rx.h +++ b/include/zenoh-pico/transport/multicast/rx.h @@ -26,8 +26,4 @@ z_result_t _z_multicast_handle_transport_message(_z_transport_multicast_t *ztm, _z_slice_t *addr); z_result_t _z_multicast_update_rx_buffer(_z_transport_multicast_t *ztm); -#ifdef __cplusplus -} -#endif - #endif /* ZENOH_PICO_TRANSPORT_LINK_RX_H */ diff --git a/include/zenoh-pico/transport/raweth/rx.h b/include/zenoh-pico/transport/raweth/rx.h index 19901b68f..de4f0558b 100644 --- a/include/zenoh-pico/transport/raweth/rx.h +++ b/include/zenoh-pico/transport/raweth/rx.h @@ -25,8 +25,4 @@ z_result_t _z_raweth_recv_t_msg(_z_transport_multicast_t *ztm, _z_transport_mess z_result_t _z_raweth_recv_t_msg_na(_z_transport_multicast_t *ztm, _z_transport_message_t *t_msg, _z_slice_t *addr); z_result_t _z_raweth_update_rx_buff(_z_transport_multicast_t *ztm); -#ifdef __cplusplus -} -#endif - #endif /* ZENOH_PICO_RAWETH_RX_H */ diff --git a/include/zenoh-pico/transport/raweth/tx.h b/include/zenoh-pico/transport/raweth/tx.h index a338c16f3..109367206 100644 --- a/include/zenoh-pico/transport/raweth/tx.h +++ b/include/zenoh-pico/transport/raweth/tx.h @@ -27,8 +27,4 @@ z_result_t _z_raweth_send_n_msg(_z_session_t *zn, const _z_network_message_t *z_ z_congestion_control_t cong_ctrl); z_result_t _z_raweth_send_t_msg(_z_transport_common_t *ztc, const _z_transport_message_t *t_msg); -#ifdef __cplusplus -} -#endif - #endif /* ZENOH_PICO_RAWETH_TX_H */ diff --git a/include/zenoh-pico/transport/unicast/rx.h b/include/zenoh-pico/transport/unicast/rx.h index 8052ebd88..7f7e036f8 100644 --- a/include/zenoh-pico/transport/unicast/rx.h +++ b/include/zenoh-pico/transport/unicast/rx.h @@ -26,8 +26,4 @@ z_result_t _z_unicast_recv_t_msg_na(_z_transport_unicast_t *ztu, _z_transport_me z_result_t _z_unicast_handle_transport_message(_z_transport_unicast_t *ztu, _z_transport_message_t *t_msg); z_result_t _z_unicast_update_rx_buffer(_z_transport_unicast_t *ztu); -#ifdef __cplusplus -} -#endif - #endif /* ZENOH_PICO_UNICAST_RX_H */ diff --git a/src/protocol/keyexpr.c b/src/protocol/keyexpr.c index 4ce2ab919..b27655dd8 100644 --- a/src/protocol/keyexpr.c +++ b/src/protocol/keyexpr.c @@ -70,14 +70,6 @@ _z_keyexpr_t _z_keyexpr_duplicate(const _z_keyexpr_t *src) { return dst; } -_z_keyexpr_t *_z_keyexpr_clone(const _z_keyexpr_t *src) { - _z_keyexpr_t *dst = z_malloc(sizeof(_z_keyexpr_t)); - if (dst != NULL) { - _z_keyexpr_copy(dst, src); - } - return dst; -} - _z_keyexpr_t _z_keyexpr_steal(_Z_MOVE(_z_keyexpr_t) src) { _z_keyexpr_t stolen = *src; *src = _z_keyexpr_null();