mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Handle too many Script default names used
When adding to many scripts without naming them, one can overflow the number of default generated script names, in which case we force the user to enter a name.
This commit is contained in:
@@ -47,10 +47,10 @@ private:
|
||||
/* If the storage available space has a smaller size than
|
||||
* k_fullFreeSpaceSizeLimit, we consider the script store as full.
|
||||
* To be able to add a new empty record, the available space should at least
|
||||
* stores a Script with default name "script99.py" (12 char), the importation
|
||||
* status (1 char), the default content "from math import *\n" (20 char) and
|
||||
* 10 char of free space. */
|
||||
static constexpr int k_fullFreeSpaceSizeLimit = sizeof(Ion::Storage::record_size_t)+12+1+20+10;
|
||||
* be able to store a Script with default name and its extension, the
|
||||
* importation status (1 char), the default content "from math import *\n"
|
||||
* (20 char) and 10 char of free space. */
|
||||
static constexpr int k_fullFreeSpaceSizeLimit = sizeof(Ion::Storage::record_size_t)+Script::k_defaultScriptNameMaxSize+k_scriptExtensionLength+1+20+10;
|
||||
static constexpr size_t k_fileInput2ParseNodeStructKind = 1;
|
||||
static constexpr size_t k_functionDefinitionParseNodeStructKind = 3;
|
||||
static constexpr size_t k_expressionStatementParseNodeStructKind = 5;
|
||||
|
||||
Reference in New Issue
Block a user