diff options
| author | Tyge Løvset <[email protected]> | 2022-10-28 09:39:48 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-10-28 09:39:48 +0200 |
| commit | 7f03a0a99daaa3df326f2904091affe55e910156 (patch) | |
| tree | 71e6408dcef490d61b277b080867e3a4b26e0c8e /include/stc/forward.h | |
| parent | 426d0a4cef8f9910fd4f8209ee0e57bd9ff4c1e8 (diff) | |
| download | STC-modified-7f03a0a99daaa3df326f2904091affe55e910156.tar.gz STC-modified-7f03a0a99daaa3df326f2904091affe55e910156.zip | |
Changed internal rep. for cstr to support 22 bytes small string instead of 23, in order to have 0-initialized strings to be valid empty strings.
Diffstat (limited to 'include/stc/forward.h')
| -rw-r--r-- | include/stc/forward.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/stc/forward.h b/include/stc/forward.h index 39628fa0..2e0b3445 100644 --- a/include/stc/forward.h +++ b/include/stc/forward.h @@ -55,7 +55,7 @@ typedef struct { cstr_value* data; size_t size, cap; } cstr_buf; typedef struct { cstr_value* str; } cstr; #else typedef union { - struct { cstr_value data[sizeof(cstr_buf) - 1]; unsigned char last; } sml; + struct { cstr_value data[sizeof(cstr_buf) - 1]; unsigned char size; } sml; struct { cstr_value* data; size_t size, ncap; } lon; } cstr; #endif |
