From a4ed715f7237b99aee25288af07f472882eba24c Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 14 Apr 2020 13:40:54 -0400 Subject: Build a list of body parts parallel to structure --- imap.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'imap.h') diff --git a/imap.h b/imap.h index 5919b8f..a2c13bd 100644 --- a/imap.h +++ b/imap.h @@ -117,6 +117,13 @@ static inline struct Data dataCheck(struct Data data, enum Type type) { return data; } +static inline struct Data dataTake(struct Data *from) { + struct Data take = *from; + from->type = Atom; + from->atom = AtomNil; + return take; +} + static inline void listPush(struct List *list, struct Data data) { if (list->len == list->cap) { list->cap = (list->cap ? list->cap * 2 : 4); -- cgit 1.4.1