diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-10-02 23:57:30 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-10-02 23:57:30 -0400 |
| commit | baea09062482674220a3686d488a283e6b9b8821 (patch) | |
| tree | 33df470af1db2be53fabac50762c375951acb84e /src/stdlib/lists.h | |
| parent | 126050a6357d7ec1fd9901256de50923b6dd7c49 (diff) | |
| parent | 597699243a6f935231ad83e63d22bf6ff9e4e547 (diff) | |
Merge branch 'zero-nones' into dev
Diffstat (limited to 'src/stdlib/lists.h')
| -rw-r--r-- | src/stdlib/lists.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stdlib/lists.h b/src/stdlib/lists.h index 1386b2fa..457fed52 100644 --- a/src/stdlib/lists.h +++ b/src/stdlib/lists.h @@ -9,6 +9,10 @@ #include "types.h" #include "util.h" +extern char _EMPTY_LIST_SENTINEL; +#define EMPTY_LIST ((List_t){.data = &_EMPTY_LIST_SENTINEL}) +#define EMPTY_ATOMIC_LIST ((List_t){.data = &_EMPTY_LIST_SENTINEL, .atomic = 1}) + // Convert negative indices to back-indexed without branching: index0 = index + (index < 0)*(len+1)) - 1 #define List_get_checked(list_expr, index_expr, item_type, start, end) \ ({ \ |
