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 ! |
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: