-
Notifications
You must be signed in to change notification settings - Fork 511
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
Support COM-style query signatures with unconventional parameter positions #1805
Conversation
It looks great! |
Do you want to loosen up the type check on the ComOutPtr parameter? (Seems to be limited to void** right now.) That would let in trouble makers like: // Windows.Win32.Graphics.Direct2D.ID2D1Factory1
unsafe HRESULT GetEffectProperties([In][Const] Guid* effectId, [Out][ComOutPtr] ID2D1Properties* properties);
// Windows.Win32.UI.Shell.IHlinkBrowseContext
unsafe HRESULT Clone([In] IUnknown piunkOuter, [In][Const] Guid* riid, [Out][ComOutPtr] IUnknown* ppiunkObj); |
I think it might be better to fix those in metadata. That way we can confirm they are truly meant to be Case law: microsoft/win32metadata#446 |
} | ||
_ => { | ||
let name = self.param_name(param.def); | ||
if let ArrayInfo::Fixed(fixed) = param.array_info { |
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.
Instead of the chained if let ArrayInfo
and continue
calls you can turn this all into a match expression.
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.
There seem to be quite a few such candidates. I can tackle these separately.
Fixes #1354
@robmikh let me know what you think of the transformation of
ICompositionDrawingSurfaceInterop
.