Unverified Commit 0c35f54f authored by Lu JJ's avatar Lu JJ Committed by GitHub
Browse files

fix an unclear comment and add a comment to 'zi' in 'quicklist.h' (#10633)

fix an unclear comment quicklist container formats to quicklist node container formats
Add a comment to 'zi' in quicklistIter (Where it first appeared)
Why do I add a comment to zi:
Because it is not a variable name with a clear meaning, and its name seems to be from the deprecated ziplist.
parent df787764
...@@ -116,7 +116,7 @@ typedef struct quicklist { ...@@ -116,7 +116,7 @@ typedef struct quicklist {
typedef struct quicklistIter { typedef struct quicklistIter {
quicklist *quicklist; quicklist *quicklist;
quicklistNode *current; quicklistNode *current;
unsigned char *zi; unsigned char *zi; /* points to the current element */
long offset; /* offset in current listpack */ long offset; /* offset in current listpack */
int direction; int direction;
} quicklistIter; } quicklistIter;
...@@ -141,7 +141,7 @@ typedef struct quicklistEntry { ...@@ -141,7 +141,7 @@ typedef struct quicklistEntry {
/* quicklist compression disable */ /* quicklist compression disable */
#define QUICKLIST_NOCOMPRESS 0 #define QUICKLIST_NOCOMPRESS 0
/* quicklist container formats */ /* quicklist node container formats */
#define QUICKLIST_NODE_CONTAINER_PLAIN 1 #define QUICKLIST_NODE_CONTAINER_PLAIN 1
#define QUICKLIST_NODE_CONTAINER_PACKED 2 #define QUICKLIST_NODE_CONTAINER_PACKED 2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment