summaryrefslogtreecommitdiff
path: root/read.h
diff options
context:
space:
mode:
Diffstat (limited to 'read.h')
-rw-r--r--read.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/read.h b/read.h
index 788c401..2d74d77 100644
--- a/read.h
+++ b/read.h
@@ -63,7 +63,11 @@
#define REDIS_REPLY_BIGNUM 13
#define REDIS_REPLY_VERB 14
-#define REDIS_READER_MAX_BUF (1024*16) /* Default max unused reader buffer. */
+/* Default max unused reader buffer. */
+#define REDIS_READER_MAX_BUF (1024*16)
+
+/* Default multi-bulk element limit */
+#define REDIS_READER_MAX_ARRAY_ELEMENTS ((1LL<<32) - 1)
#ifdef __cplusplus
extern "C" {
@@ -71,7 +75,7 @@ extern "C" {
typedef struct redisReadTask {
int type;
- int elements; /* number of elements in multibulk container */
+ long long elements; /* number of elements in multibulk container */
int idx; /* index in parent (array) object */
void *obj; /* holds user-generated value for a read task */
struct redisReadTask *parent; /* parent task */
@@ -96,6 +100,7 @@ typedef struct redisReader {
size_t pos; /* Buffer cursor */
size_t len; /* Buffer length */
size_t maxbuf; /* Max length of unused buffer */
+ long long maxelements; /* Max multi-bulk elements */
redisReadTask **task;
int tasks;