[dotnet] final blittable pinvoke (#17723)

test passes now.
This commit is contained in:
Steve Hawley 2023-03-07 10:16:11 -05:00 коммит произвёл GitHub
Родитель a39cefa457
Коммит dec6ce3445
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -278,12 +278,21 @@ namespace Darwin {
asl_unset (Handle, keyStr);
}
#if NET
[DllImport (Constants.SystemLibrary)]
extern static IntPtr asl_key (IntPtr handle, int /* uint32_t */ key);
#else
[DllImport (Constants.SystemLibrary)]
extern static string asl_key (IntPtr handle, int /* uint32_t */ key);
#endif
public string this [int key]{
get {
#if NET
return Marshal.PtrToStringAuto (asl_key (Handle, key))!;
#else
return asl_key (Handle, key);
#endif
}
}

Просмотреть файл

@ -41,7 +41,6 @@ namespace Cecil.Tests {
public string Reason;
}
[Ignore ("work in progress - there are 3 failures in mac version, mostly due to delegates and strings")]
[TestCaseSource (typeof (Helper), nameof (Helper.NetPlatformImplementationAssemblyDefinitions))]
public void CheckForNonBlittablePInvokes (AssemblyInfo info)
{