Use ObjFW functions for memory management

FossilOrigin-Name: 71ebb79f8f6a5c2920c91b004bf274f9133e3ee04caddaf0f5ba01f98db27762
This commit is contained in:
Jonathan Schleifer 2025-03-08 03:26:23 +00:00
parent a28209edcf
commit 3d8735818d
10 changed files with 23 additions and 32 deletions

View file

@ -247,7 +247,7 @@ pruneundos(int maxremain) // bound memory
{
t += undos[i]->xs * undos[i]->ys * sizeof(sqr);
if (t > maxremain)
free(undos.remove(i));
OFFreeMemory(undos.remove(i));
}
}
@ -268,7 +268,7 @@ editundo()
}
block *p = undos.pop();
blockpaste(*p);
free(p);
OFFreeMemory(p);
}
block *copybuf = NULL;
@ -278,7 +278,7 @@ copy()
{
EDITSELMP;
if (copybuf)
free(copybuf);
OFFreeMemory(copybuf);
copybuf = blockcopy(sel);
}