diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-10-01 12:43:00 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-10-01 12:43:00 -0400 |
| commit | 6583fe9b389a6b4698f9364945885e6783506886 (patch) | |
| tree | 0464456d177eab051b03f29a74218a45b301f174 /src/stdlib/datatypes.h | |
| parent | 0cfae753aa131f949253f3fba1e3a36c2bde6ac0 (diff) | |
Convert to using more zero values for `none`
Diffstat (limited to 'src/stdlib/datatypes.h')
| -rw-r--r-- | src/stdlib/datatypes.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/stdlib/datatypes.h b/src/stdlib/datatypes.h index 373cbc47..cbf09519 100644 --- a/src/stdlib/datatypes.h +++ b/src/stdlib/datatypes.h @@ -41,7 +41,7 @@ typedef struct { // structs can be passed in two 64-bit registers. C will handle doing the // bit arithmetic to extract the necessary values, which is cheaper than // spilling onto the stack and needing to retrieve data from the stack. - int64_t length : LIST_LENGTH_BITS; + uint64_t length : LIST_LENGTH_BITS; uint64_t free : LIST_FREE_BITS; bool atomic : LIST_ATOMIC_BITS; uint8_t data_refcount : LIST_REFCOUNT_BITS; @@ -73,11 +73,11 @@ typedef struct { void *fn, *userdata; } Closure_t; -enum text_type { TEXT_ASCII, TEXT_GRAPHEMES, TEXT_CONCAT, TEXT_BLOB }; +enum text_type { TEXT_NONE, TEXT_ASCII, TEXT_GRAPHEMES, TEXT_CONCAT, TEXT_BLOB }; typedef struct Text_s { - int64_t length : 54; // Number of grapheme clusters - uint8_t tag : 2; + uint64_t length : 53; // Number of grapheme clusters + uint8_t tag : 3; uint8_t depth : 8; union { struct { |
