diff options
author | michael-grunder <michael.grunder@gmail.com> | 2021-04-19 01:27:59 +0300 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2021-06-22 20:16:23 +0300 |
commit | 4cb4cd0ee26fdd1a07f468b976f990dbb9de7ed0 (patch) | |
tree | 16046fc52ef712839ae0a252d20e9a9dacb69c21 /redis_cluster.h | |
parent | 2d72c55d7d0402bfdf147ba71cead38d2573e203 (diff) |
Separate compression and create utility methods
This commit splits compression and serialization into two distinct parts
and adds some utility functions so the user can compress/uncompress
or pack/unpack data explicily.
See #1939
Diffstat (limited to 'redis_cluster.h')
-rw-r--r-- | redis_cluster.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/redis_cluster.h b/redis_cluster.h index c6959fde..41f40c1a 100644 --- a/redis_cluster.h +++ b/redis_cluster.h @@ -13,7 +13,7 @@ redis_##name##_cmd(INTERNAL_FUNCTION_PARAM_PASSTHRU, c->flags, &cmd, \ &cmd_len, &slot) -/* Append information required to handle MULTI commands to the tail of our MULTI +/* Append information required to handle MULTI commands to the tail of our MULTI * linked list. */ #define CLUSTER_ENQUEUE_RESPONSE(c, slot, cb, ctx) \ clusterFoldItem *_item; \ @@ -69,8 +69,8 @@ CLUSTER_ENQUEUE_RESPONSE(c, slot, resp_func, ctx); \ RETURN_ZVAL(getThis(), 1, 0); \ } \ - resp_func(INTERNAL_FUNCTION_PARAM_PASSTHRU, c, ctx); - + resp_func(INTERNAL_FUNCTION_PARAM_PASSTHRU, c, ctx); + /* More generic processing, where only the keyword differs */ #define CLUSTER_PROCESS_KW_CMD(kw, cmdfunc, resp_func, readcmd) \ redisCluster *c = GET_CONTEXT(); \ @@ -89,7 +89,7 @@ CLUSTER_ENQUEUE_RESPONSE(c, slot, resp_func, ctx); \ RETURN_ZVAL(getThis(), 1, 0); \ } \ - resp_func(INTERNAL_FUNCTION_PARAM_PASSTHRU, c, ctx); + resp_func(INTERNAL_FUNCTION_PARAM_PASSTHRU, c, ctx); /* Create cluster context */ zend_object *create_cluster_context(zend_class_entry *class_type); @@ -293,6 +293,10 @@ PHP_METHOD(RedisCluster, setoption); PHP_METHOD(RedisCluster, _prefix); PHP_METHOD(RedisCluster, _serialize); PHP_METHOD(RedisCluster, _unserialize); +PHP_METHOD(RedisCluster, _compress); +PHP_METHOD(RedisCluster, _uncompress); +PHP_METHOD(RedisCluster, _pack); +PHP_METHOD(RedisCluster, _unpack); PHP_METHOD(RedisCluster, _masters); PHP_METHOD(RedisCluster, _redir); |