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

make z_drop on zenoh entities call actual drop instead of undeclare #641

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

DenisBiryukov91
Copy link
Contributor

make z_drop on zenoh entities call actual drop instead of undeclare.
This is in particular will be required to support eclipse-zenoh/zenoh#1334.

Copy link

github-actions bot commented Sep 3, 2024

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

@DenisBiryukov91 DenisBiryukov91 added the api fix Problem in the API label Sep 3, 2024
Copy link

github-actions bot commented Sep 3, 2024

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

@DenisBiryukov91 DenisBiryukov91 added the internal Changes not included in the changelog label Sep 3, 2024
#[allow(clippy::missing_safety_doc)]
#[no_mangle]
pub extern "C" fn z_queryable_drop(this_: &mut z_moved_queryable_t) {
z_undeclare_queryable(this_);
std::mem::drop(this_.take_rust_type())
Copy link
Member

Choose a reason for hiding this comment

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

Should it be undeclared before the drop then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. The drop automatically undeclares currently. With eclipse-zenoh/zenoh#1334 drop and undeclare will intentionally have different behavior.

Copy link
Member

@sashacmc sashacmc left a comment

Choose a reason for hiding this comment

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

LGTM!

@milyin milyin merged commit b65f8d4 into eclipse-zenoh:main Sep 3, 2024
17 of 19 checks passed
@DenisBiryukov91 DenisBiryukov91 deleted the fix_zenoh_entity_drop branch December 16, 2024 14:15
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 internal Changes not included in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants