aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c/lacweb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/lacweb.c')
-rw-r--r--src/c/lacweb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/c/lacweb.c b/src/c/lacweb.c
index 53710e28..2b806f86 100644
--- a/src/c/lacweb.c
+++ b/src/c/lacweb.c
@@ -31,6 +31,11 @@ void lw_free(lw_context ctx) {
free(ctx);
}
+void lw_reset(lw_context ctx) {
+ ctx->page_front = ctx->page;
+ ctx->heap_front = ctx->heap;
+}
+
static void lw_check_heap(lw_context ctx, size_t extra) {
if (ctx->heap_back - ctx->heap_front < extra) {
size_t desired = ctx->heap_back - ctx->heap_front + extra, next;