Skip to content

Commit

Permalink
Mark z_reply_replier_id as unstable (#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc authored Oct 16, 2024
1 parent 7ccffa7 commit bd5712e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion include/zenoh-pico/api/primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -1707,6 +1707,7 @@ const z_loaned_sample_t *z_reply_ok(const z_loaned_reply_t *reply);
*/
const z_loaned_reply_err_t *z_reply_err(const z_loaned_reply_t *reply);

#ifdef Z_FEATURE_UNSTABLE_API
/**
* Gets the id of the zenoh instance that answered this Reply.
*
Expand All @@ -1717,7 +1718,9 @@ const z_loaned_reply_err_t *z_reply_err(const z_loaned_reply_t *reply);
* `true` if id is present
*/
bool z_reply_replier_id(const z_loaned_reply_t *reply, z_id_t *out_id);
#endif
#endif // Z_FEATURE_UNSTABLE_API

#endif // Z_FEATURE_QUERY == 1

#if Z_FEATURE_QUERYABLE == 1
/**
Expand Down
5 changes: 4 additions & 1 deletion src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,14 +1087,17 @@ const z_loaned_sample_t *z_reply_ok(const z_loaned_reply_t *reply) { return &rep

const z_loaned_reply_err_t *z_reply_err(const z_loaned_reply_t *reply) { return &reply->data._result.error; }

#ifdef Z_FEATURE_UNSTABLE_API
bool z_reply_replier_id(const z_loaned_reply_t *reply, z_id_t *out_id) {
if (_z_id_check(reply->data.replier_id)) {
*out_id = reply->data.replier_id;
return true;
}
return false;
}
#endif
#endif // Z_FEATURE_UNSTABLE_API

#endif // Z_FEATURE_QUERY == 1

#if Z_FEATURE_QUERYABLE == 1
_Z_OWNED_FUNCTIONS_RC_IMPL(query)
Expand Down

0 comments on commit bd5712e

Please sign in to comment.