Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark z_reply_replier_id as unstable #745

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading