Skip to content

Instantly share code, notes, and snippets.

View TomohiroSuzuki128's full-sized avatar

Tomohiro Suzuki TomohiroSuzuki128

View GitHub Profile
@TomohiroSuzuki128
TomohiroSuzuki128 / registrar.m
Created December 22, 2019 08:28
registrar.m (Xamarin.Forms)
#include <xamarin/xamarin.h>
#include "registrar.h"
extern "C" {
static id native_to_managed_trampoline_1 (id self, SEL _cmd, MonoMethod **managed_method_ptr, bool* call_super, uint32_t token_ref)
{
uint8_t flags = NSObjectFlagsNativeRef;
guint32 exception_gchandle = 0;
MonoMethod *managed_method = *managed_method_ptr;
void *arg_ptrs [0];
MONO_ASSERT_GC_SAFE;
@TomohiroSuzuki128
TomohiroSuzuki128 / registrar.m
Last active January 4, 2020 18:08
registrar.m (Uno Platform)
#include <xamarin/xamarin.h>
#include "registrar.h"
extern "C" {
static id native_to_managed_trampoline_1 (id self, SEL _cmd, MonoMethod **managed_method_ptr, bool* call_super, uint32_t token_ref)
{
uint8_t flags = NSObjectFlagsNativeRef;
guint32 exception_gchandle = 0;
MonoMethod *managed_method = *managed_method_ptr;
void *arg_ptrs [0];
MONO_ASSERT_GC_SAFE;