Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
aa549962
Commit
aa549962
authored
May 22, 2010
by
Pieter Noordhuis
Browse files
re-introduce ZIP_BIGLEN for clarity
parent
c7019f70
Changes
1
Hide whitespace changes
Inline
Side-by-side
ziplist.c
View file @
aa549962
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include "ziplist.h"
#include "ziplist.h"
#define ZIP_END 255
#define ZIP_END 255
#define ZIP_BIGLEN 254
/* Entry encoding */
/* Entry encoding */
#define ZIP_ENC_RAW 0
#define ZIP_ENC_RAW 0
...
@@ -42,7 +43,7 @@
...
@@ -42,7 +43,7 @@
#define ZIPLIST_LENGTH(zl) (*((zl)+sizeof(unsigned int)))
#define ZIPLIST_LENGTH(zl) (*((zl)+sizeof(unsigned int)))
#define ZIPLIST_HEADER_SIZE (sizeof(unsigned int)+1)
#define ZIPLIST_HEADER_SIZE (sizeof(unsigned int)+1)
#define ZIPLIST_INCR_LENGTH(zl,incr) { \
#define ZIPLIST_INCR_LENGTH(zl,incr) { \
if (ZIPLIST_LENGTH(zl) <
(
ZIP_
END-1)
) ZIPLIST_LENGTH(zl)+=incr; }
if (ZIPLIST_LENGTH(zl) < ZIP_
BIGLEN
) ZIPLIST_LENGTH(zl)+=incr; }
/* Return bytes needed to store integer encoded by 'encoding' */
/* Return bytes needed to store integer encoded by 'encoding' */
static
unsigned
int
zipEncodingSize
(
char
encoding
)
{
static
unsigned
int
zipEncodingSize
(
char
encoding
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment