diff options
| author | Albert Cervin <albert@acervin.com> | 2023-02-25 21:37:48 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2023-02-25 21:38:59 +0100 |
| commit | 40db61eb7a2019ced97f09a9687139f35749f4e0 (patch) | |
| tree | 9291e44eb82721732d04146b5042545e1b9e91f9 /src/undo.h | |
| parent | 44fd8cde61e3e89e5f83c98900a403e922073727 (diff) | |
| download | dged-40db61eb7a2019ced97f09a9687139f35749f4e0.tar.gz dged-40db61eb7a2019ced97f09a9687139f35749f4e0.tar.xz dged-40db61eb7a2019ced97f09a9687139f35749f4e0.zip | |
Introduce vec and hashmap
Convenience macros for a hashmap and a growable vector.
Diffstat (limited to 'src/undo.h')
| -rw-r--r-- | src/undo.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,3 +1,4 @@ +#include "vec.h" #include <stdbool.h> #include <stdint.h> @@ -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; }; |
