-
Notifications
You must be signed in to change notification settings - Fork 84
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
Subscriber callbacks now receive a refcounted z_sample #410
Subscriber callbacks now receive a refcounted z_sample #410
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general LGTM (well, besides the fact that the interface will still have to be changed, but that’s my concern)
Only please revert z_reply_ok return type naming
} | ||
|
||
void _z_sample_move(_z_sample_t *dst, _z_sample_t *src) { | ||
dst->keyexpr._id = src->keyexpr._id; // FIXME: call the z_keyexpr_move |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should finally fix this FIXME?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function doesn't exist, I wasn't sure if it was the right PR to create those. Because I might as well do it for all of them.
@@ -45,7 +45,7 @@ void reply_dropper(void *ctx) { | |||
void reply_handler(z_owned_reply_t *oreply, void *ctx) { | |||
(void)(ctx); | |||
if (z_reply_is_ok(oreply)) { | |||
z_sample_t sample = z_reply_ok(oreply); | |||
z_loaned_sample_t sample = z_reply_ok(oreply); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert z_reply_ok
result type renaming z_sample_t
/ z_loaned_sample_t
(z_reply_ok
in the new API will return const z_loaned_sample_t *
, I already did it and this renaming will only introduce additional conflicts.)
382e3ab
into
eclipse-zenoh:protocol_changes
Similarly to #327, this PR switch to refcounted z_sample for subscriber callbacks so they can be easily used out of the callback's context. Now it necessarily impacts the API a little, but this will be changed in a future PR anyway so considerations on this aspect should be limited.
This PR contains:
If you could review this @sashacmc.