-
Notifications
You must be signed in to change notification settings - Fork 392
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
Add bindings for mwindow opts #1035
Conversation
Thanks for the PR! I'm a little uncertain about using |
@ehuss Happy to do that change ! Just to make sure I understand correctly, do you suggest casting the |
Good question. I would probably just change the types of the function signatures to be It is a bit unfortunate that the usize↔size_t relationship isn't clearer. Being a type alias (and not a newtype wrapper) makes it even more ambiguous. |
Makes sense, I pushed an update to use |
Thanks! One more thing, I'm pretty sure these need to be unsafe. There is no synchronization in modifying these values, so they should only be done on the main thread before any threads are spawned. (At least, that is my understanding. Interaction with C globals seems like a dark art.) |
Good point, done ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This adds bindings for the mwindow options (https://libgit2.org/libgit2/#HEAD/group/libgit2/git_libgit2_opts)
This will avoid calling libgit2-sys directly to set these options, see related issues where this would be useful: