summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-10-19 20:47:04 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-10-19 21:24:30 +0200
commitd4b4a9128eefe9ac57de1fea371f3b3dacae0b1c (patch)
tree89e951327229cdc6723d3b8647b7e2addfac73b5
parentc8d72f7c7aababdb63771b272a811c96e7de78a3 (diff)
Revert e5dd32d8 that added the const qualifier for command callbacks
-rw-r--r--hiredis.c2
-rw-r--r--hiredis.h6
-rw-r--r--test.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/hiredis.c b/hiredis.c
index 13da532..fdbbd6d 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -839,7 +839,7 @@ void *redisCommand(redisContext *c, const char *format, ...) {
* Always returns NULL. In a non-blocking context this will never fail because
* this function does not do any I/O. In a blocking context this function will
* have no effect (a callback in a blocking context makes no sense). */
-void *redisCommandWithCallback(redisContext *c, redisCallbackFn *fn, const void *privdata, const char *format, ...) {
+void *redisCommandWithCallback(redisContext *c, redisCallbackFn *fn, void *privdata, const char *format, ...) {
va_list ap;
sds cmd;
int status;
diff --git a/hiredis.h b/hiredis.h
index 8a0e2aa..b8c69bb 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -80,7 +80,7 @@ struct redisContext; /* need forward declaration of redisContext */
typedef void (redisContextCallbackFn)(struct redisContext*, void*);
/* Reply callback prototype and container */
-typedef void (redisCallbackFn)(struct redisContext*, redisReply*, const void*);
+typedef void (redisCallbackFn)(struct redisContext*, redisReply*, void*);
/* Callback containers */
typedef struct redisContextCallback {
@@ -90,7 +90,7 @@ typedef struct redisContextCallback {
typedef struct redisCallback {
redisCallbackFn *fn;
- const void *privdata;
+ void *privdata;
} redisCallback;
/* Context for a connection to Redis */
@@ -163,6 +163,6 @@ void *redisCommand(redisContext *c, const char *format, ...);
*
* Note: when called with a blocking context, this function will not do
* anything and immediately returns NULL. */
-void *redisCommandWithCallback(redisContext *c, redisCallbackFn *fn, const void *privdata, const char *format, ...);
+void *redisCommandWithCallback(redisContext *c, redisCallbackFn *fn, void *privdata, const char *format, ...);
#endif
diff --git a/test.c b/test.c
index cbf8149..4c55118 100644
--- a/test.c
+++ b/test.c
@@ -203,7 +203,7 @@ static void __test_callback(redisContext *c, void *privdata) {
}
static long __test_reply_callback_flags = 0;
-static void __test_reply_callback(redisContext *c, redisReply *reply, const void *privdata) {
+static void __test_reply_callback(redisContext *c, redisReply *reply, void *privdata) {
((void)c);
/* Shift to detect execution order */
__test_reply_callback_flags <<= 8;