DLLEXPORT void jl_get_system_hooks(void) { if (jl_errorexception_type) return; // only do this once jl_errorexception_type = (jl_datatype_t*)basemod("ErrorException"); jl_typeerror_type = (jl_datatype_t*)basemod("TypeError"); jl_methoderror_type = (jl_datatype_t*)basemod("MethodError"); jl_loaderror_type = (jl_datatype_t*)basemod("LoadError"); jl_weakref_type = (jl_datatype_t*)basemod("WeakRef"); }
DLLEXPORT void jl_get_system_hooks(void) { if (jl_method_missing_func) return; // only do this once jl_errorexception_type = (jl_struct_type_t*)basemod("ErrorException"); jl_typeerror_type = (jl_struct_type_t*)basemod("TypeError"); jl_loaderror_type = (jl_struct_type_t*)basemod("LoadError"); jl_backtrace_type = (jl_struct_type_t*)basemod("BackTrace"); jl_method_missing_func = (jl_function_t*)basemod("method_missing"); }