summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-04-04 15:31:09 +0200
committerantirez <antirez@gmail.com>2014-04-04 15:31:09 +0200
commite2871e21fd95168ca83403a219bdd02e44d9b37b (patch)
treee617a50628eb509edb1fd0345bac2cb70c888ef7
parent8046756f3b60edb6c4c924ec869f299968b828f2 (diff)
downloadredis-e2871e21fd95168ca83403a219bdd02e44d9b37b.tar.gz
More encoding checking macros in redis.h.
-rw-r--r--src/redis.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/redis.h b/src/redis.h
index 00cfbdd24..80ae4a651 100644
--- a/src/redis.h
+++ b/src/redis.h
@@ -1081,8 +1081,10 @@ int compareStringObjects(robj *a, robj *b);
int collateStringObjects(robj *a, robj *b);
int equalStringObjects(robj *a, robj *b);
unsigned long long estimateObjectIdleTime(robj *o);
-#define sdsEncodedObject(objptr) (objptr->encoding == REDIS_ENCODING_RAW || objptr->encoding == REDIS_ENCODING_EMBSTR)
+#define rawEncodedObject(objptr) (objptr->encoding == REDIS_ENCODING_RAW)
#define lzfEncodedObject(objptr) (objptr->encoding == REDIS_ENCODING_LZF)
+#define intEncodedObject(objptr) (objptr->encoding == REDIS_ENCODING_INT)
+#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);