aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xclr.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/clr.cpp b/clr.cpp
index f628155..7a76509 100755
--- a/clr.cpp
+++ b/clr.cpp
@@ -1040,7 +1040,6 @@ static int classloader(char *dirname, char *classname)
class_addfloat(clr_class->pd_class,clr_method_float);
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);
if((clr_class->method_list = mono_method_desc_search_in_class(clr_desc_list,clr_class->mono_class)) != NULL)
@@ -1083,20 +1082,16 @@ void clr_setup(void)
strcat(tconf,"/etc");
mono_set_dirs(tlib,tconf);
#endif
-
- monodomain = mono_jit_init("PureData");
+
+ try {
+ monodomain = mono_jit_init("PureData");
+ }
+ catch(...) {
+ monodomain = NULL;
+ }
+
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);
mono_add_internal_call("PureData.Core::PostBug",(const void *)PD_PostBug);