From 46180fa59938bd323575e60f0dfa79570794601a Mon Sep 17 00:00:00 2001 From: Alexander Bushnev Date: Mon, 14 Oct 2024 18:32:21 +0200 Subject: [PATCH] Add `export "C"` for closures callbacks --- include/zenoh-pico/net/query.h | 8 ++++++++ include/zenoh-pico/session/session.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/include/zenoh-pico/net/query.h b/include/zenoh-pico/net/query.h index 5e57c1eee..ed2c7579c 100644 --- a/include/zenoh-pico/net/query.h +++ b/include/zenoh-pico/net/query.h @@ -21,6 +21,10 @@ #include "zenoh-pico/net/session.h" #include "zenoh-pico/protocol/core.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * The query to be answered by a queryable. */ @@ -58,4 +62,8 @@ _z_queryable_t _z_queryable_null(void); bool _z_queryable_check(const _z_queryable_t *queryable); #endif +#ifdef __cplusplus +} +#endif + #endif /* ZENOH_PICO_QUERY_NETAPI_H */ diff --git a/include/zenoh-pico/session/session.h b/include/zenoh-pico/session/session.h index 3d591d906..1b7ea5dd9 100644 --- a/include/zenoh-pico/session/session.h +++ b/include/zenoh-pico/session/session.h @@ -26,6 +26,10 @@ #include "zenoh-pico/protocol/core.h" #include "zenoh-pico/transport/manager.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * The callback signature of the cleanup functions. */ @@ -203,4 +207,8 @@ void _z_declare_data_clear(_z_declare_data_t *data); _Z_ELEM_DEFINE(_z_declare_data, _z_declare_data_t, _z_noop_size, _z_declare_data_clear, _z_noop_copy) _Z_LIST_DEFINE(_z_declare_data, _z_declare_data_t) +#ifdef __cplusplus +} +#endif + #endif /* INCLUDE_ZENOH_PICO_SESSION_SESSION_H */