summaryrefslogtreecommitdiff
path: root/hiredis.h
diff options
context:
space:
mode:
Diffstat (limited to 'hiredis.h')
-rw-r--r--hiredis.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/hiredis.h b/hiredis.h
index 1ae1c0a..d76a9e3 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -35,10 +35,10 @@
#define __HIREDIS_H
#include "read.h"
#include <stdarg.h> /* for va_list */
-#ifndef _WIN32
+#ifndef _MSC_VER
#include <sys/time.h> /* for struct timeval */
#else
-#include <winsock2.h>
+struct timeval; /* forward declaration */
#endif
#include <stdint.h> /* uintXX_t, etc */
#include "sds.h" /* for sds */
@@ -101,8 +101,10 @@ extern "C" {
typedef struct redisReply {
int type; /* REDIS_REPLY_* */
long long integer; /* The integer when type is REDIS_REPLY_INTEGER */
+ double dval; /* The double when type is REDIS_REPLY_DOUBLE */
size_t len; /* Length of string */
- char *str; /* Used for both REDIS_REPLY_ERROR and REDIS_REPLY_STRING */
+ char *str; /* Used for REDIS_REPLY_ERROR, REDIS_REPLY_STRING
+ and REDIS_REPLY_DOUBLE (in additionl to dval). */
size_t elements; /* number of elements, for REDIS_REPLY_ARRAY */
struct redisReply **element; /* elements vector for REDIS_REPLY_ARRAY */
} redisReply;