mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[code] Add comment on how --code-script option is parsed
This commit is contained in:
@@ -57,6 +57,11 @@ void App::Snapshot::setOpt(const char * name, char * value) {
|
||||
}
|
||||
*separator = 0;
|
||||
const char * scriptName = value;
|
||||
/* We include the 0 in the scriptContent to represent the importation
|
||||
* status. It is set to 1 after addScriptFromTemplate. Indeed, this '/0'
|
||||
* char has two goals: ending the scriptName and representing the
|
||||
* importation status; we cannot set it to 1 before adding the script to
|
||||
* storage. */
|
||||
const char * scriptContent = separator;
|
||||
Code::ScriptTemplate script(scriptName, scriptContent);
|
||||
m_scriptStore.addScriptFromTemplate(&script);
|
||||
|
||||
Reference in New Issue
Block a user