From f5f31ff9b92b6bdf628716449d0d0782ceb7704a Mon Sep 17 00:00:00 2001 From: "Meir Shpilraien (Spielrein)" Date: Sun, 11 Jul 2021 21:26:20 +0300 Subject: Added REDIS_NO_AUTO_FREE_REPLIES flag (#962) When set hiredis will not automatically free replies in an async context, and the replies must be freed instead by the user. Co-authored-by: Michael Grunder --- hiredis.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hiredis.h') diff --git a/hiredis.h b/hiredis.h index e77a88a..be8525f 100644 --- a/hiredis.h +++ b/hiredis.h @@ -86,6 +86,9 @@ typedef long long ssize_t; */ #define REDIS_NO_AUTO_FREE 0x200 +/* Flag that indicates the user does not want replies to be automatically freed */ +#define REDIS_NO_AUTO_FREE_REPLIES 0x400 + #define REDIS_KEEPALIVE_INTERVAL 15 /* seconds */ /* number of times we retry to connect in the case of EADDRNOTAVAIL and @@ -153,6 +156,11 @@ struct redisSsl; /* Don't automatically intercept and free RESP3 PUSH replies. */ #define REDIS_OPT_NO_PUSH_AUTOFREE 0x08 +/** + * Don't automatically free replies + */ +#define REDIS_OPT_NOAUTOFREEREPLIES 0x10 + /* In Unix systems a file descriptor is a regular signed int, with -1 * representing an invalid descriptor. In Windows it is a SOCKET * (32- or 64-bit unsigned integer depending on the architecture), where -- cgit v1.2.3