nostrdb/cursor: remove old array code

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-01-04 13:44:15 -08:00
committed by Daniel D’Aquino
parent 2b14acd62f
commit 6dbf3416b9

View File

@@ -16,11 +16,6 @@ struct cursor {
unsigned char *end;
};
struct array {
struct cursor cur;
unsigned int elem_size;
};
static inline void reset_cursor(struct cursor *cursor)
{
cursor->p = cursor->start;
@@ -39,12 +34,6 @@ static inline void make_cursor(unsigned char *start, unsigned char *end, struct
cursor->end = end;
}
static inline void make_array(struct array *a, unsigned char* start, unsigned char *end, unsigned int elem_size)
{
make_cursor(start, end, &a->cur);
a->elem_size = elem_size;
}
static inline int cursor_eof(struct cursor *c)
{
return c->p == c->end;