summaryrefslogtreecommitdiff
path: root/src/utils/include/engine/utils/list.h
blob: 04dda0441d1e43b8ac88b0ff3de60a38856eea35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef ENGINE_LIST_H
#define ENGINE_LIST_H

#ifdef __cplusplus
extern "C" {
#endif

#define DEFINE_LLIST(type)                                                     \
  struct List_##type {                                                         \
    type value;                                                                \
    struct List_##type* next;                                                  \
    /* Force the user to add `;` for style consistency */                      \
  } List_##type

#ifdef __cplusplus
}
#endif
#endif