You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 12, 2024. It is now read-only.
The managed enum size should, when possible, match the native one. E.g.
using System;
using System.Runtime.InteropServices;
using SwiftRuntimeLibrary;
using SwiftRuntimeLibrary.SwiftMarshal;
namespace XamVersions
{
[SwiftEnumHasRawValue(typeof(long))]
[SwiftEnumType("libXamVersions.dylib", "_T011XamVersions8SemanticOMn",
"_T011XamVersions8SemanticON", "")]
public enum Semantic
{
Major,
Minor,
Patch,
Same,
Unknown
}
}
should be public enum Semantic : long as this will help if that same type is used in C or ObjC intro with other API. If the size don't match then extra, manual code is required (and that often leads to mistakes).
The [Native] attribute (from XI/XM) can also be used when a enum is based on n[u]int (NS[U]Integer) as we have some tooling to spot those cases.
The text was updated successfully, but these errors were encountered:
The managed enum size should, when possible, match the native one. E.g.
should be
public enum Semantic : long
as this will help if that same type is used in C or ObjC intro with other API. If the size don't match then extra, manual code is required (and that often leads to mistakes).The
[Native]
attribute (from XI/XM) can also be used when a enum is based onn[u]int
(NS[U]Integer
) as we have some tooling to spot those cases.The text was updated successfully, but these errors were encountered: