Skip to content
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 input #194

Merged
merged 13 commits into from
Dec 23, 2024
Merged

Conversation

stevenbrix
Copy link
Collaborator

@stevenbrix stevenbrix commented Dec 19, 2024

This PR adds support for arrays as input

Changes

  1. Add Array+ToAbi and Array+FromABI methods. These use the WinRTBridgeable, AbiBridge and AbiInterfaceBridge to convert swift arrays to winrt and vice-versa. (FromAbi is needed for VTable implementations). These methods are what we use in Arc today when handwriting these APIs
  2. make necessary code changes in code_writers.h to support array input parameters
  3. added tests, moved test methods from Class to ArrayMethods
  4. moved common test types to a Types.idl

Fixes DEVEX-32

@stevenbrix stevenbrix requested a review from a team as a code owner December 19, 2024 01:03
Copy link
Contributor

@tristanlabelle tristanlabelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed all but code_writers.h, which I struggle to follow

tests/test_component/cpp/ArrayMethods.h Show resolved Hide resolved
tests/test_component/cpp/ArrayMethods.cpp Show resolved Hide resolved
swiftwinrt/helpers.h Outdated Show resolved Hide resolved
swiftwinrt/code_writers/can_write.h Show resolved Hide resolved
swiftwinrt/Resources/Support/IInspectable.swift Outdated Show resolved Hide resolved
@stevenbrix stevenbrix force-pushed the steve/winrt-bridgeable branch from 5636af4 to 11731e7 Compare December 23, 2024 19:12
Base automatically changed from steve/winrt-bridgeable to main December 23, 2024 19:17
@stevenbrix stevenbrix force-pushed the steve/add-support-for-array-input branch from 4d2e3be to 572a46f Compare December 23, 2024 19:35
@stevenbrix stevenbrix merged commit 9a4be08 into main Dec 23, 2024
1 check passed
@stevenbrix stevenbrix deleted the steve/add-support-for-array-input branch December 23, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants