From 40db61eb7a2019ced97f09a9687139f35749f4e0 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Sat, 25 Feb 2023 21:37:48 +0100 Subject: Introduce vec and hashmap Convenience macros for a hashmap and a growable vector. --- src/undo.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/undo.h') diff --git a/src/undo.h b/src/undo.h index 42022c5..1ce3a8a 100644 --- a/src/undo.h +++ b/src/undo.h @@ -1,3 +1,4 @@ +#include "vec.h" #include #include @@ -40,10 +41,8 @@ struct undo_record { #define INVALID_TOP -1 struct undo_stack { - struct undo_record *records; - uint32_t nrecords; + VEC(struct undo_record) records; uint32_t top; - uint32_t capacity; bool undo_in_progress; }; -- cgit v1.2.3