Skip to content

fix handling of MaybeUninit #106

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mhama
Copy link

@mhama mhama commented Mar 30, 2025

With current csbindgen, type MaybeUninit<some_type> will be converted to MaybeUninit on the binding code. This behaviour makes the output code unusable because the information about the internal type is missing.

I modified the parser code to just ignore MaybeUninit<> and just use the internal type.
I'm not expert of Rust but I think it is ok, as MaybeUninit is for indicating that the memory is not initialized, I guess it can be ignored on binding code.

For reference, here's one of the code which uses MaybeUninit<>.
https://github.com/eclipse-zenoh/zenoh-c/blob/1010f5b6544f476a34046420a7a561e754ce6cbd/src/session.rs#L82-L86

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.

1 participant