| 151 | } |
| 152 | |
| 153 | string ModuleFileAccess::getIncludeFileName ( const string & fileName, const string & incFileName ) const { |
| 154 | if (failed() || !includeGet) return FileAccess::getIncludeFileName(fileName,incFileName); |
| 155 | vec4f args[2]; |
| 156 | args[0] = cast<const char *>::from(incFileName.c_str()); |
| 157 | args[1] = cast<const char *>::from(fileName.c_str()); |
| 158 | vec4f res = context->evalWithCatch(includeGet, args, nullptr); |
| 159 | auto exc = context->getException(); exc; |
| 160 | DAS_ASSERTF(!exc, "exception failed in `include_get`: %s", exc); |
| 161 | auto fname = cast<const char *>::to(res); |
| 162 | return fname ? fname : ""; |
| 163 | } |
| 164 | |
| 165 | bool ModuleFileAccess::isSameFileName ( const string & a, const string & b ) const { |
| 166 | if (failed() || !sameFileName) return FileAccess::isSameFileName(a,b); |
nothing calls this directly
no test coverage detected