aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2021-03-27 11:13:40 +0300
committerAleksey Veresov <aleksey@veresov.pro>2021-03-27 11:13:40 +0300
commit860b7939b067102e01acbad9ef3effd48b4bf5af (patch)
treeeac04e19194792d715c25497a9bc2451862bcd93 /src
parent32c02216ce3df45004a933cc16745880841262e5 (diff)
downloadcsx-860b7939b067102e01acbad9ef3effd48b4bf5af.tar
csx-860b7939b067102e01acbad9ef3effd48b4bf5af.tar.xz
csx-860b7939b067102e01acbad9ef3effd48b4bf5af.zip
Fix.
Now the system works. =)
Diffstat (limited to 'src')
-rw-r--r--src/csx.c42
1 files changed, 37 insertions, 5 deletions
diff --git a/src/csx.c b/src/csx.c
index caf6288..8367801 100644
--- a/src/csx.c
+++ b/src/csx.c
@@ -115,8 +115,40 @@ static void gc(csxi *csx)
{
int i;
if (csx->objslen < csx->lastlen * 2) return;
- csx_obj(csx->basenames.name)->mark = 1;
- csx_obj(csx->basenames.pair)->mark = 1;
+ csx_obj(csx->basenames.name)->mark = 1;
+ csx_obj(csx->basenames.pair)->mark = 1;
+ csx_obj(csx->basenames.str)->mark = 1;
+ csx_obj(csx->basenames._int)->mark = 1;
+ csx_obj(csx->basenames.base)->mark = 1;
+ csx_obj(csx->basenames.fn)->mark = 1;
+ csx_obj(csx->basenames.sx)->mark = 1;
+ csx_obj(csx->basenames.set)->mark = 1;
+ csx_obj(csx->basenames._isset)->mark = 1;
+ csx_obj(csx->basenames.sethead)->mark = 1;
+ csx_obj(csx->basenames.settail)->mark = 1;
+ csx_obj(csx->basenames.head)->mark = 1;
+ csx_obj(csx->basenames.tail)->mark = 1;
+ csx_obj(csx->basenames.qt)->mark = 1;
+ csx_obj(csx->basenames.same)->mark = 1;
+ csx_obj(csx->basenames.type)->mark = 1;
+ csx_obj(csx->basenames._do)->mark = 1;
+ csx_obj(csx->basenames._if)->mark = 1;
+ csx_obj(csx->basenames._plus)->mark = 1;
+ csx_obj(csx->basenames._star)->mark = 1;
+ csx_obj(csx->basenames.neg)->mark = 1;
+ csx_obj(csx->basenames.div)->mark = 1;
+ csx_obj(csx->basenames.mod)->mark = 1;
+ csx_obj(csx->basenames._less)->mark = 1;
+ csx_obj(csx->basenames._more)->mark = 1;
+ csx_obj(csx->basenames.out)->mark = 1;
+ csx_obj(csx->basenames.in)->mark = 1;
+ csx_obj(csx->basenames.len)->mark = 1;
+ csx_obj(csx->basenames.run)->mark = 1;
+ csx_obj(csx->basenames.context)->mark = 1;
+ csx_obj(csx->basenames.newcontext)->mark = 1;
+ csx_obj(csx->basenames._exit)->mark = 1;
+ csx_obj(csx->null)->mark = 1;
+ csx_obj(csx->one)->mark = 1;
deepmark(csx, csx->context);
for (i = 0; i != csx->stacklen; ++i) {
deepmark(csx, csx->stack[i]);
@@ -627,9 +659,9 @@ static void init_the_name(csxi *csx)
static char *init_basename(csxi *csx, const char *name)
{
- const int len = strlen(name);
- char *res = new(csx, csx->basenames.name, len);
- memcpy(res, name, len);
+ const int size = strlen(name) + 1;
+ char *res = new(csx, csx->basenames.name, size);
+ memcpy(res, name, size);
return res;
}