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 clone for types which do not involve copying #645

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

sashacmc
Copy link
Member

@sashacmc sashacmc commented Sep 10, 2024

Removes:

  • z_subscriber_clone
  • z_publisher_clone
  • z_queryable_clone
  • z_session_clone

Closes: #639

@sashacmc sashacmc added the enhancement Things could work better label Sep 10, 2024
@sashacmc sashacmc requested a review from milyin September 10, 2024 17:30
src/api/api.c Outdated Show resolved Hide resolved
@DenisBiryukov91
Copy link
Contributor

There is a deep copy function _z_keyexpr_copy that can be used for proper z_keyexpr clone (zenoh-c has a keyexpr clone).
User might also likely need a clone for reply_err aka value (zenoh-c has a reply err clone).
I would also remove z_session_clone since it is not a side-effects free operation (zenoh-c does not have a session clone).

@sashacmc
Copy link
Member Author

We also need to add a z_config_clone implementation, but it will be done in separate PR

@milyin milyin merged commit 21aeda9 into eclipse-zenoh:main Sep 11, 2024
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Things could work better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync clone methods with zenoh-c
3 participants