Hi,
when I read sds.h,I find the note indicate that "sdshdr5 is never used, we just access the flags byte directly.However is here to document the layout of type 5 SDS strings.".
but when I set a short string, like ">set test hello", I find the key "test" is actuall stroed by sdshdr5 by
gdb.it seems that sdshdr5 is used.
what does that notes mean?
Here is the source code :
/* Note: sdshdr5 is never used, we just access the flags byte directly.
* However is here to document the layout of type 5 SDS strings. */
struct __attribute__ ((__packed__)) sdshdr5 {
unsigned char flags; /* 3 lsb of type, and 5 msb of string length */
char buf[];
};