Update of /cvsroot/pure-data/externals/clr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20054
Modified Files: clr.cpp Log Message: try to catch eventual mono crashes
Index: clr.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/clr/clr.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** clr.cpp 28 Jan 2006 10:24:28 -0000 1.2 --- clr.cpp 28 Jan 2006 10:31:22 -0000 1.3 *************** *** 1041,1045 **** if((clr_class->method_symbol = mono_method_desc_search_in_class(clr_desc_symbol,clr_class->mono_class)) != NULL) class_addsymbol(clr_class->pd_class,clr_method_symbol); - // if((clr_class->method_pointer = mono_class_get_method_from_name(clr_class->mono_class,"MethodPointer",1)) != NULL) if((clr_class->method_pointer = mono_method_desc_search_in_class(clr_desc_pointer,clr_class->mono_class)) != NULL) class_addpointer(clr_class->pd_class,clr_method_pointer); --- 1041,1044 ---- *************** *** 1084,1101 **** mono_set_dirs(tlib,tconf); #endif ! ! monodomain = mono_jit_init("PureData"); if(monodomain) { - /* // add mono to C hooks - mono_add_internal_call ("PureData.pd::RegisterSelector", registerMonoMethod); - mono_add_internal_call ("PureData.pd::ToOutlet", out2outlet); - mono_add_internal_call ("PureData.pd::PostMessage", post2pd); - mono_add_internal_call ("PureData.pd::ErrorMessage", error2pd); - mono_add_internal_call ("PureData.pd::CreateOutlet", createOutlet); - mono_add_internal_call ("PureData.pd::CreateInlet", createInlet); - */ - // mono_add_internal_call ("PureData.Core::AddMethod", PD_AddMethod); - mono_add_internal_call("PureData.Core::Post",(const void *)PD_Post); mono_add_internal_call("PureData.Core::PostError",(const void *)PD_PostError); --- 1083,1096 ---- mono_set_dirs(tlib,tconf); #endif ! ! try { ! monodomain = mono_jit_init("PureData"); ! } ! catch(...) { ! monodomain = NULL; ! } ! if(monodomain) { // add mono to C hooks mono_add_internal_call("PureData.Core::Post",(const void *)PD_Post); mono_add_internal_call("PureData.Core::PostError",(const void *)PD_PostError);