| 88 | } |
| 89 | |
| 90 | bool ModuleFileAccess::canModuleBeUnsafe ( const string & mod, const string & fileName ) const { |
| 91 | if(failed() || !moduleUnsafe) return FileAccess::canModuleBeUnsafe(mod,fileName); |
| 92 | vec4f args[2]; |
| 93 | args[0] = cast<const char *>::from(mod.c_str()); |
| 94 | args[1] = cast<const char *>::from(fileName.c_str()); |
| 95 | auto res = context->evalWithCatch(moduleUnsafe, args, nullptr); |
| 96 | auto exc = context->getException(); exc; |
| 97 | DAS_ASSERTF(!exc, "exception failed in `module_unsafe`: %s", exc); |
| 98 | return cast<bool>::to(res); |
| 99 | } |
| 100 | |
| 101 | bool ModuleFileAccess::canBeRequired ( const string & mod, const string & fileName, bool isPublic ) const { |
| 102 | if(failed() || !canModuleBeRequired) return FileAccess::canBeRequired(mod,fileName,isPublic); |
no test coverage detected