Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit a2653dc

Browse files
Merge pull request #436 from xamarin/redo-ISwiftObject-implementations
No longer implementing all of ISwiftObject
2 parents c3462f1 + 0a4f43c commit a2653dc

File tree

6 files changed

+56
-212
lines changed

6 files changed

+56
-212
lines changed

SwiftReflector/MarshalEngine.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ public IEnumerable<ICodeElement> MarshalConstructor (TypeDeclaration classDecl,
113113
} else {
114114
if (isHomonym) {
115115
use.AddIfNotPresent (typeof (SwiftObjectRegistry));
116-
postMarshalCode.Add (CSReturn.ReturnLine (new CSFunctionCall (cl.Name.Name, true, thisIntPtr, new CSIdentifier ("SwiftObjectRegistry.Registry"))));
116+
postMarshalCode.Add (CSReturn.ReturnLine (new CSFunctionCall (cl.Name.Name, true, thisIntPtr,
117+
new CSFunctionCall ($"{cl.Name.Name}.GetSwiftMetatype", false), new CSIdentifier ("SwiftObjectRegistry.Registry"))));
117118
} else {
118119
postMarshalCode.Add (CSReturn.ReturnLine (thisIntPtr));
119120
}

0 commit comments

Comments
 (0)