Added lfsr_rid/bid/mid/did_t types, tried using types more consistently
Adopted lfsr_rid/bid/mid/did_t where appropriate. This includes using lfsr_rid_t for tag/rbyd weights. Although I am using lfsr_srid_t for rbyd weights now, since it both captures the use of the sign bit and reduces the number of casts a bit in the code. I learned recently Zig has any-bit integers (e.g. uint31_t), and I'm realizing how nice it would be to have those in this codebase. Also tried to use lfs_size_t/lfs_off_t more correctly. In Linux/BSD, only off_t is used for file-size-related operations and is usually much larger than size_t. These were used interchangably in littlefs and their original meaning kind of fell by the wayside. Getting their use right will be important if littlefs ever supports different integer widths.
This commit is contained in:
@@ -3192,7 +3192,7 @@ code = '''
|
||||
lfsr_btree_t btree = LFSR_BTREE_NULL;
|
||||
lfsr_btree_push(&lfs, &btree, 0, LFSR_TAG_INLINED, 1,
|
||||
LFSR_DATA("0", 1)) => 0;
|
||||
lfsr_btree_split(&lfs, &btree, 0, LFSR_DATA_NAME(0*DID, "aab", 3),
|
||||
lfsr_btree_split(&lfs, &btree, 0, LFSR_DATA_NAME(0, "aab", 3),
|
||||
LFSR_TAG_INLINED, 1, LFSR_DATA("0", 1),
|
||||
LFSR_TAG_INLINED, 1, LFSR_DATA("1", 1)) => 0;
|
||||
printf("btree: w%d 0x%x.%x\n",
|
||||
|
||||
Reference in New Issue
Block a user