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

user callback can take ownership on reply or hello #184

Merged

Conversation

milyin
Copy link
Contributor

@milyin milyin commented Mar 28, 2023

zenohc allows user callback to take ownership of owned structure passed to callback with mutable reference. This is the case for z_hello_t and z_reply_t. This behavior is explicitly documented: https://zenoh-c.readthedocs.io/en/latest/api.html#id6

This fix enables the same functionality for zenoh-pico

src/session/query.c Outdated Show resolved Hide resolved
Copy link
Member

@cguimaraes cguimaraes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small changes requests

src/collections/list.c Outdated Show resolved Hide resolved
examples/unix/c11/z_get.c Outdated Show resolved Hide resolved
examples/unix/c11/z_scout.c Outdated Show resolved Hide resolved
include/zenoh-pico/collections/list.h Outdated Show resolved Hide resolved
src/net/primitives.c Outdated Show resolved Hide resolved
include/zenoh-pico/session/session.h Outdated Show resolved Hide resolved
src/session/query.c Show resolved Hide resolved
src/session/query.c Outdated Show resolved Hide resolved
src/session/query.c Outdated Show resolved Hide resolved
Copy link
Member

@cguimaraes cguimaraes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/session/query.c Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants