diff options
author | michael-grunder <michael.grunder@gmail.com> | 2019-05-13 04:49:33 +0300 |
---|---|---|
committer | Michael Grunder <michael.grunder@gmail.com> | 2019-05-13 19:38:18 +0300 |
commit | 5cb30fb2a65abc9d31ff58af6da0fbb6be4ec153 (patch) | |
tree | f44faea9b2f4b044f41750ea31f46bc284770d81 /library.c | |
parent | be3089c6cb8344697556a00fdcebdc0619df58e0 (diff) |
Adds OPT_REPLY_LITERAL for rawCommand and EVAL
Adds an option to process the actual strings in simple string replies as
opposed to translating them to `true`. This only applies to
`rawCommand` and `eval` because as far as I know know vanilla Redis
command attaches any information besides `OK` to simple string replies.
Addresses #1550
Diffstat (limited to 'library.c')
-rw-r--r-- | library.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1684,6 +1684,7 @@ redis_sock_create(char *host, int host_len, unsigned short port, redis_sock->readonly = 0; redis_sock->tcp_keepalive = 0; + redis_sock->reply_literal = 0; return redis_sock; } @@ -2559,6 +2560,14 @@ variant_reply_generic(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, } PHP_REDIS_API int +redis_read_raw_variant_reply(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, + zval *z_tab, void *ctx) +{ + return variant_reply_generic(INTERNAL_FUNCTION_PARAM_PASSTHRU, redis_sock, + redis_sock->reply_literal, z_tab, ctx); +} + +PHP_REDIS_API int redis_read_variant_reply(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, zval *z_tab, void *ctx) { |