MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / introduceFile

Function introduceFile

src/builtin/module_builtin_rtti.cpp:1376–1382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1374 }
1375
1376 bool introduceFile ( smart_ptr_raw<FileAccess> access, char * fname, char * str, Context * context, LineInfoArg * at ) {
1377 if ( !fname ) context->throw_error_at(at, "expecting file name");
1378 const char * safeStr = str ? str : "";
1379 uint32_t str_len = stringLength(*context, safeStr);
1380 auto fileInfo = make_unique<TextFileInfo>(safeStr, str_len, false);
1381 return access->setFileInfo(fname, das::move(fileInfo)) != nullptr;
1382 }
1383
1384#else
1385 smart_ptr<FileAccess> makeFileAccess( char *, Context * context, LineInfoArg * at ) {

Callers

nothing calls this directly

Calls 3

stringLengthFunction · 0.85
throw_error_atMethod · 0.80
setFileInfoMethod · 0.80

Tested by

no test coverage detected