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

Remove const from closure params #653

Merged
merged 4 commits into from
Sep 12, 2024

Conversation

sashacmc
Copy link
Member

@sashacmc sashacmc commented Sep 12, 2024

Closes: #647

Copy link

PR missing one of the required labels: {'documentation', 'breaking-change', 'dependencies', 'new feature', 'bug', 'internal', 'enhancement'}

@sashacmc sashacmc added enhancement Things could work better api sync Synchronize API with other bindings labels Sep 12, 2024
@sashacmc sashacmc force-pushed the mutable_closure_params branch from 923d8ca to 0733d7c Compare September 12, 2024 13:01
@sashacmc sashacmc marked this pull request as ready for review September 12, 2024 13:24
@sashacmc sashacmc requested a review from milyin September 12, 2024 13:24

typedef void (*z_id_handler_t)(const z_id_t *id, void *arg);
typedef void (*z_id_handler_t)(z_id_t *id, void *arg);
Copy link
Contributor

@DenisBiryukov91 DenisBiryukov91 Sep 12, 2024

Choose a reason for hiding this comment

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

z_id_t is non-owned object, there is no benefit in having it non-const, also leads to questions whether the user is in the right to call free on it ?

@milyin milyin merged commit eef549b into eclipse-zenoh:main Sep 12, 2024
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api sync Synchronize API with other bindings enhancement Things could work better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make callback closures provide mutable loaned structs
3 participants