summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Tecco <rt@lambda.(none)>2010-06-08 14:02:56 -0700
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-19 12:25:04 +0100
commit74254a3b392ee391cd6e4667370d0c7963bb986b (patch)
tree8a8ebea99dc1520a3d1220860ecf82af4940159c
parent09a0fe626fa7d53666a3fa53aca79880f8fe3bff (diff)
add extern "C" for C++ compiles
-rw-r--r--hiredis.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/hiredis.h b/hiredis.h
index cb25b36..21098cc 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -69,6 +69,10 @@
#define REDIS_REPLY_NIL 4
#define REDIS_REPLY_STATUS 5
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* This is the reply object returned by redisCommand() */
typedef struct redisReply {
int type; /* REDIS_REPLY_* */
@@ -154,4 +158,8 @@ void *redisvCommand(redisContext *c, const char *format, va_list ap);
void *redisCommand(redisContext *c, const char *format, ...);
void *redisCommandArgv(redisContext *c, int argc, const char **argv, const size_t *argvlen);
+#ifdef __cplusplus
+}
+#endif
+
#endif