refactor: remove sourcePath parameter from wrenInterpret and related module functions

The sourcePath field on ObjModule was redundant since it always matched the module name except for the main script. This change removes the parameter from wrenInterpret, wrenInterpretInModule, and wrenNewModule, and replaces all references to module->sourcePath with module->name in error reporting and debug output.
This commit is contained in:
Bob Nystrom
2015-10-16 01:17:42 +00:00
parent c65fdb2f94
commit 8b70246acd
10 changed files with 22 additions and 50 deletions
+2 -2
View File
@@ -206,7 +206,7 @@ void runFile(const char* path)
initVM();
WrenInterpretResult result = wrenInterpret(vm, path, source);
WrenInterpretResult result = wrenInterpret(vm, source);
if (afterLoadFn != NULL) afterLoadFn(vm);
@@ -247,7 +247,7 @@ int runRepl()
}
// TODO: Handle failure.
wrenInterpret(vm, "Prompt", line);
wrenInterpret(vm, line);
// TODO: Automatically print the result of expressions.
}