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

hopefully the last one #137

Merged
merged 2 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions swiftwinrt/code_writers.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,6 @@ bind<write_abi_args>(function));

auto impl_names = w.push_impl_names(true);

auto c_name = is_struct(*generic_param) ?
generic_param->mangled_name() :
generic_param->cpp_abi_name();

w.write(R"(internal enum %: ReferenceBridge {
typealias CABI = %
typealias SwiftProjection = %
Expand All @@ -527,7 +523,7 @@ bind<write_abi_args>(function));
get_full_swift_type_name(w, generic_param),
w.support,
type.mangled_name(),
c_name,
bind<write_type>(*generic_param, write_type_params::c_abi),
bind<write_default_init_assignment>(*generic_param, projection_layer::c_abi),
bind<write_consume_type>(generic_param, "result", true),
type.mangled_name());
Expand Down
2 changes: 1 addition & 1 deletion swiftwinrt/code_writers/type_writers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static void write_c_abi_type(writer& w, metadata_type const& type)
}
else if (auto systype = dynamic_cast<const system_type*>(&type))
{
if (systype->cpp_abi_name() == "GUID")
if (systype->category() == param_category::guid_type)
{
w.write("%.GUID", w.support);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7121,7 +7121,7 @@ internal enum __x_ABI_C__FIReference_1_GUIDBridge: ReferenceBridge {

static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
guard let val = abi else { return nil }
var result: GUID = .init()
var result: test_component.GUID = .init()
try! CHECKED(val.get().pointee.lpVtbl.pointee.get_Value(val.get(), &result))
return .init(from: result)
}
Expand Down Expand Up @@ -7237,7 +7237,7 @@ internal enum __x_ABI_C__FIReference_1___x_ABI_Ctest__zcomponent__CSignedBridge:

static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
guard let val = abi else { return nil }
var result: Signed = .init(0)
var result: __x_ABI_Ctest__component_CSigned = .init(0)
stevenbrix marked this conversation as resolved.
Show resolved Hide resolved
try! CHECKED(val.get().pointee.lpVtbl.pointee.get_Value(val.get(), &result))
return result
}
Expand Down