mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Remove EditorController::m_areaBuffer
This was a very large buffer that took a lot of RAM space (the size of the storage). Instead of having it, we just move the available space of the storage at the end of the edited script, and move it back when the edition finishes. This is slower but saves a lot of space.
This commit is contained in:
@@ -38,7 +38,7 @@ void ScriptStore::scanScriptsForFunctionsAndVariables(void * context, ScanCallba
|
||||
// Handle lexer or parser errors with nlr.
|
||||
nlr_buf_t nlr;
|
||||
if (nlr_push(&nlr) == 0) {
|
||||
const char * scriptContent = scriptAtIndex(scriptIndex).readContent();
|
||||
const char * scriptContent = scriptAtIndex(scriptIndex).scriptContent();
|
||||
if (scriptContent == nullptr) {
|
||||
continue;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ const char * ScriptStore::contentOfScript(const char * name) {
|
||||
if (script.isNull()) {
|
||||
return nullptr;
|
||||
}
|
||||
return script.readContent();
|
||||
return script.scriptContent();
|
||||
}
|
||||
|
||||
Script::ErrorStatus ScriptStore::addScriptFromTemplate(const ScriptTemplate * scriptTemplate) {
|
||||
|
||||
Reference in New Issue
Block a user