(MOD) Implemented Array_Create, Array_CopyOf and Array_Delete

(MOD) Replaced project compiler from "gcc" with "clang" due to out-of-order execution keep happening after running with Array.

(MOD) Removed certain functions from Utils due to insufficiencies of usage.

(MOD) Defined 1 more macro "fail".

(MOD) Fixed 1 bug from "var.c":  Struct member "alive" was not under supervision from the entire programme cycle.

(MOD) Removed 1 useless usage for "Utils_LiteraliseInteger".

(MOD) Removed 1 useless block of commented code.
This commit is contained in:
2024-06-26 15:20:47 +08:00
parent d19256621b
commit bc4be4e295
9 changed files with 154 additions and 197 deletions

View File

@@ -47,9 +47,10 @@ Status Var_CopyOf(Var *inst, Var *other)
void Var_Delete(Var *inst)
{
svoid(!inst);
svoid(!inst || !inst->alive);
free(inst->addr);
inst->alive = false;
inst->addr = NULL;
inst->size = 0;
}