Skip to content

Commit b5e434d

Browse files
committed
[WIP] Bad, fix, good!
1 parent d4ae8d9 commit b5e434d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Mono.Android/Android.Runtime/AndroidRuntime.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,16 @@ protected override IEnumerable<string> GetSimpleReferences (Type type)
325325
}
326326

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

330330
protected override string? GetReplacementTypeCore (string jniSimpleReference)
331331
{
332-
return _monodroid_lookup_replacement_type (jniSimpleReference);
332+
IntPtr ret = _monodroid_lookup_replacement_type (jniSimpleReference);
333+
if (ret == IntPtr.Zero) {
334+
return null;
335+
}
336+
337+
return Marshal.PtrToStringAnsi (ret);
333338
}
334339

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

0 commit comments

Comments
 (0)