void mono_gc_register_bridge_callbacks (MonoGCBridgeCallbacks *callbacks) { if (callbacks->bridge_version != SGEN_BRIDGE_VERSION) g_error ("Invalid bridge callback version. Expected %d but got %d\n", SGEN_BRIDGE_VERSION, callbacks->bridge_version); bridge_callbacks = *callbacks; if (!bridge_processor.reset_data) sgen_new_bridge_init (&bridge_processor); }
static gboolean init_bridge_processor (SgenBridgeProcessor *processor, const char *name) { if (!strcmp ("old", name)) { memset (processor, 0, sizeof (SgenBridgeProcessor)); sgen_old_bridge_init (processor); } else if (!strcmp ("new", name)) { memset (processor, 0, sizeof (SgenBridgeProcessor)); sgen_new_bridge_init (processor); } else { return FALSE; } return TRUE; }