Host introspection: Difference between revisions
m
→{{header|Wren}}: Minor tidy
Naveen.phys (talk | contribs) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 1,428:
{{trans|C}}
As this information cannot be reliably obtained via Wren CLI, we instead embed a Wren script in a C application and ask the host program to get it for us.
<syntaxhighlight lang="
class C {
Line 1,518:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
|