Skip to content

Commit

Permalink
[WIP] Bad, fix, good!
Browse files Browse the repository at this point in the history
  • Loading branch information
grendello committed Jun 2, 2022
1 parent 4f02758 commit acbb135
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Mono.Android/Android.Runtime/AndroidRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,16 @@ protected override IEnumerable<string> GetSimpleReferences (Type type)
}

[DllImport (AndroidRuntime.InternalDllName, CallingConvention = CallingConvention.Cdecl)]
static extern string? _monodroid_lookup_replacement_type (string jniSimpleReference);
static extern IntPtr _monodroid_lookup_replacement_type (string jniSimpleReference);

protected override string? GetReplacementTypeCore (string jniSimpleReference)
{
return _monodroid_lookup_replacement_type (jniSimpleReference);
IntPtr ret = _monodroid_lookup_replacement_type (jniSimpleReference);
if (ret == IntPtr.Zero) {
return null;
}

return Marshal.PtrToStringAnsi (ret);
}

[DllImport (AndroidRuntime.InternalDllName, CallingConvention = CallingConvention.Cdecl)]
Expand Down

0 comments on commit acbb135

Please sign in to comment.