-
Notifications
You must be signed in to change notification settings - Fork 16
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 support for array output and by reference #198
Conversation
For "fill" arrays, I was thinking |
@tristanlabelle wouldn't |
adds final support for arrays, by supporting output and reference arrays.
These two implementations are fairly similar, so that's why i did them in one go. The only difference is that for output arrays the callee allocates the buffer (via
CoTaskMemAlloc
) and in reference arrays, the caller pre-allocates the buffer and it is filled in by the callee. Since Swift doesn't have true "out" params, the APIs for these on the Swift side are identical (bothinout [T]
) which could lead to some confusion. Possible improvement may be to use something likeArraySlice
for reference arrays?Changes
Array+ToABI.swift
to support allocating+filling a WinRT buffer.Array+ToABI.swift
to use the sameWinRTArrayABI
typealias thatArray+FromAbi.swift
uses. This made code-gen simplerGetGlyphIndices
as this conflicts with Win2D API (would love to not use any Windows headers!!)Arc builds/runs with the needed changes to remove the handwritten APIs we created due to lack of array support in swift-winrt.