windows_bindgen
should make use of Option<NonNull<T>>
instead of Option<*mut/const T>
for ptr
params.
#3411
Labels
enhancement
New feature or request
Suggestion
Currently, a lot of bindings for optional
in
orout
pointer parameters of bindings are usingOption
around the possibly null pointer, which:None
check and not a no-op.Making binding rely on
Option<NonNull<T>>
should be a general and quite easy improvement (though, it will not allow to express if the param can be mutated by bound function). Other then this little drawback, are there any other reasons not to opt for this kind of binding generating?The text was updated successfully, but these errors were encountered: