diff options
| author | Mistivia <i@mistivia.com> | 2025-11-16 13:52:14 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-11-16 13:52:14 +0800 |
| commit | f547737c46fdb09f47072348b0725074a7352db2 (patch) | |
| tree | d9005ad7599f45e4aaf35642797ece5223183cf3 /list.h | |
| parent | f19a0f0dd0a36a7a9129eacf9362f1168561c9c2 (diff) | |
update compile flags
Diffstat (limited to 'list.h')
| -rw-r--r-- | list.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -21,7 +21,7 @@ } T##List; \ void T##List_init(T##List *self); \ void T##List_free(T##List *self); \ - void T##List_move(T##List *self); \ + T##List T##List_move(T##List *self); \ T##ListIter T##List_insert_before(T##List *self, T##ListIter iter, T val); \ T##ListIter T##List_insert_after(T##List *self, T##ListIter iter, T val); \ void T##List_remove(T##List *self, T##ListIter iter); \ @@ -56,7 +56,7 @@ LIST_DEF(Int); cur = next; \ } \ } \ - void T##List_move(T##List *self) { \ + T##List T##List_move(T##List *self) { \ T##List dup; \ dup.vhead = self->vhead; \ dup.vtail = self->vtail; \ @@ -64,6 +64,7 @@ LIST_DEF(Int); self->vhead = NULL; \ self->vtail = NULL; \ self->len = 0; \ + return dup; \ } \ T##ListIter T##List_insert_before(T##List *self, T##ListIter iter, T val) { \ if (iter->prev == NULL) return NULL; \ |
