Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion runtime/trampolines.m
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,15 @@
}
}
} else {
xamarin_assertion_message ("Don't know how to marshal a return value of type '%s.%s'. Please file a bug with a test case at https://github.com/xamarin/xamarin-macios/issues/new\n", mono_class_get_namespace (r_klass), mono_class_get_name (r_klass));
#if DOTNET
if (xamarin_is_class_intptr (r_klass) || xamarin_is_class_nativehandle (r_klass)) {
#else
if (xamarin_is_class_intptr (r_klass)) {
#endif
returnValue = *(void **) mono_object_unbox (retval);
} else {
xamarin_assertion_message ("Don't know how to marshal a return value of type '%s.%s'. Please file a bug with a test case at https://github.com/xamarin/xamarin-macios/issues/new\n", mono_class_get_namespace (r_klass), mono_class_get_name (r_klass));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you have the fullname, why not change the assertion message to:
xamarin_assertion_message ("Don't know how to marshal a return value of type '%s', Please Please file a bug with a test case at https://github.com/xamarin/xamarin-macios/issues/new\n", full name);

On a side note, I wonder if this won't be immediately stale with the .NET 6 transition to NativeHandle instead of IntPtr.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both good points @stephen-hawley I'll address them shortly. Thanks!

}
}

xamarin_mono_object_release (&r_klass);
Expand Down