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

z_xxx_loan_mut functions are not defined for all types where they are necessary #714

Open
milyin opened this issue Sep 24, 2024 · 0 comments
Labels
api fix Problem in the API enhancement New feature or request

Comments

@milyin
Copy link
Contributor

milyin commented Sep 24, 2024

Describe the release item

E.g. there is z_closure_reply_call function with prototype

pub extern "C" fn z_closure_reply_call(
    closure: &z_loaned_closure_reply_t,
    reply: &mut z_loaned_reply_t,
) 

but there is no z_reply_loan_mut function which can return &mut z_loaned_reply_t

This happens because z_xxx_loan_mut functions were introduced only if there are other functions accepting mutable loan reference. But as we can see, this is easy to forget to add z_xxx_loan_mut function when it's necessary.

The proposal is to just implement z_xxx_loan_mut for all types, near the corresponding z_xxx_loan ones.

Anyway these functions will make sense when z_take for mutable loaned references is implemented: eclipse-zenoh/zenoh#1372

@milyin milyin added the release Part of the next release label Sep 24, 2024
@milyin milyin changed the title z_xxx_loan_mut functions defined not for all necessary types z_xxx_loan_mut functions are not defined for all types where they are necessary Sep 24, 2024
@milyin milyin added enhancement New feature or request api fix Problem in the API and removed release Part of the next release labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api fix Problem in the API enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant