diff options
Diffstat (limited to 'src/redis.h')
-rw-r--r-- | src/redis.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/redis.h b/src/redis.h index 24efef57b..795e67aac 100644 --- a/src/redis.h +++ b/src/redis.h @@ -105,6 +105,7 @@ #define REDIS_ENCODING_ZIPLIST 5 /* Encoded as ziplist */ #define REDIS_ENCODING_INTSET 6 /* Encoded as intset */ #define REDIS_ENCODING_SKIPLIST 7 /* Encoded as skiplist */ +#define REDIS_ENCODING_EMBSTR 8 /* Embedded sds string encoding */ /* Defines related to the dump file format. To store 32 bits lengths for short * keys requires a lot of space, so we check the most significant 2 bits of @@ -960,6 +961,8 @@ void freeZsetObject(robj *o); void freeHashObject(robj *o); robj *createObject(int type, void *ptr); robj *createStringObject(char *ptr, size_t len); +robj *createRawStringObject(char *ptr, size_t len); +robj *createEmbeddedStringObject(char *ptr, size_t len); robj *dupStringObject(robj *o); int isObjectRepresentableAsLongLong(robj *o, long long *llongval); robj *tryObjectEncoding(robj *o); @@ -985,6 +988,7 @@ char *strEncoding(int encoding); int compareStringObjects(robj *a, robj *b); int equalStringObjects(robj *a, robj *b); unsigned long estimateObjectIdleTime(robj *o); +#define sdsEncodedObject(objptr) (objptr->encoding == REDIS_ENCODING_RAW || objptr->encoding == REDIS_ENCODING_EMBSTR) /* Synchronous I/O with timeout */ ssize_t syncWrite(int fd, char *ptr, ssize_t size, long long timeout); |