Skip to content

Commit

Permalink
Edit drawings
Browse files Browse the repository at this point in the history
Signed-off-by: Viktor Söderqvist <[email protected]>
  • Loading branch information
zuiderkwast committed Jan 21, 2025
1 parent b79d924 commit 62cb46f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/t_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
*
* ENTRY_ENC_EMB_VALUE, used when it fits in a cache line:
*
* +--------------+-------------------------+
* | field | value | value |
* | hdr "foo" \0 | hdr_size | hdr "bar" \0 |
* +------^-------+-------------------------+
* +--------------+----------------+--------------+
* | field | 1 byte | value |
* | hdr "foo" \0 | value-hdr-size | hdr "bar" \0 |
* +------^-------+----------------+--------------+
* |
* |
* entry pointer = field sds
Expand Down Expand Up @@ -95,10 +95,10 @@ hashTypeEntry *hashTypeCreateEntry(sds field, sds value) {
if (canUseEmbeddedValueEntry(field, value)) {
/* Embed field and value, including one byte value-hdr-size.
*
* +--------------+-------------------------+
* | field | value | value |
* | hdr "foo" \0 | hdr_size | hdr "bar" \0 |
* +--------------+-------------------------+
* +--------------+----------------+--------------+
* | field | 1 byte | value |
* | hdr "foo" \0 | value-hdr-size | hdr "bar" \0 |
* +--------------+----------------+--------------+
*/
size_t value_size = sdscopytobuffer(NULL, 0, value, NULL);
size_t min_size = field_size + 1 + value_size;
Expand Down

0 comments on commit 62cb46f

Please sign in to comment.