Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 121e9d9

Browse files
Implement BLMOVE and add LMOVE/BLMOVE to cluster.
* Refactor `redis_lmove_cmd` to work for both `LMOVE` and `BLMOVE` * Implement `LMOVE` and `BLMOVE` in RedisCluster. See #1894
1 parent b1d78f3 commit 121e9d9

12 files changed

Lines changed: 184 additions & 50 deletions

redis.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,10 +1158,14 @@ PHP_METHOD(Redis, lLen)
11581158
}
11591159
/* }}} */
11601160

1161+
/* {{{ proto string Redis::blMove(string source, string destination, string wherefrom, string whereto, double $timeout) */
1162+
PHP_METHOD(Redis, blmove) {
1163+
REDIS_PROCESS_KW_CMD("BLMOVE", redis_lmove_cmd, redis_string_response);
1164+
}
1165+
11611166
/* {{{ proto string Redis::lMove(string source, string destination, string wherefrom, string whereto) */
1162-
PHP_METHOD(Redis, lMove)
1163-
{
1164-
REDIS_PROCESS_CMD(lmove, redis_string_response);
1167+
PHP_METHOD(Redis, lMove) {
1168+
REDIS_PROCESS_KW_CMD("LMOVE", redis_lmove_cmd, redis_string_response);
11651169
}
11661170

11671171
/* {{{ proto boolean Redis::lrem(string list, string value, int count = 0) */

redis.stub.php

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,9 +1920,9 @@ public function lLen(string $key): Redis|int|false;
19201920
* @param string $src The source list.
19211921
* @param string $dst The destination list
19221922
* @param string $wherefrom Where in the source list to retrieve the element. This can be either
1923-
* `Redis::LEFT`, or `Redis::RIGHT`.
1923+
* - `Redis::LEFT`, or `Redis::RIGHT`.
19241924
* @param string $whereto Where in the destination list to put the element. This can be either
1925-
* `Redis::LEFT`, or `Redis::RIGHT`.
1925+
* - `Redis::LEFT`, or `Redis::RIGHT`.
19261926
* @return Redis|string|false The element removed from the source list.
19271927
*
19281928
* @example
@@ -1931,6 +1931,27 @@ public function lLen(string $key): Redis|int|false;
19311931
*/
19321932
public function lMove(string $src, string $dst, string $wherefrom, string $whereto): Redis|string|false;
19331933

1934+
/**
1935+
* Move an element from one list to another, blocking up to a timeout until an element is available.
1936+
*
1937+
* @param string $src The source list
1938+
* @param string $dst The destination list
1939+
* @param string $wherefrom Where in the source list to extract the element.
1940+
* - `Redis::LEFT`, or `Redis::RIGHT`.
1941+
* @param string $whereto Where in the destination list to put the element.
1942+
* - `Redis::LEFT`, or `Redis::RIGHT`.
1943+
* @param float $timeout How long to block for an element.
1944+
*
1945+
* @return Redis|string|false;
1946+
*
1947+
* @example
1948+
* @redis->lPush('numbers', 'one');
1949+
* @redis->blmove('numbers', 'odds', Redis::LEFT, Redis::LEFT 1.0);
1950+
* // This call will block, if no additional elements are in 'numbers'
1951+
* @redis->blmove('numbers', 'odds', Redis::LEFT, Redis::LEFT, 1.0);
1952+
*/
1953+
public function blmove(string $src, string $dst, string $wherefrom, string $whereto, float $timeout): Redis|string|false;
1954+
19341955
/**
19351956
* Pop one or more elements off a list.
19361957
*

redis_arginfo.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: a22731395ec32eed913fde7b2de60758fb1e75da */
2+
* Stub hash: 399e9506bc58ff0da1abc8f46a02b2499ed1223a */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Redis___construct, 0, 0, 0)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "null")
@@ -479,6 +479,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_Redis_lMove, 0, 4, Red
479479
ZEND_ARG_TYPE_INFO(0, whereto, IS_STRING, 0)
480480
ZEND_END_ARG_INFO()
481481

482+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_Redis_blmove, 0, 5, Redis, MAY_BE_STRING|MAY_BE_FALSE)
483+
ZEND_ARG_TYPE_INFO(0, src, IS_STRING, 0)
484+
ZEND_ARG_TYPE_INFO(0, dst, IS_STRING, 0)
485+
ZEND_ARG_TYPE_INFO(0, wherefrom, IS_STRING, 0)
486+
ZEND_ARG_TYPE_INFO(0, whereto, IS_STRING, 0)
487+
ZEND_ARG_TYPE_INFO(0, timeout, IS_DOUBLE, 0)
488+
ZEND_END_ARG_INFO()
489+
482490
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_Redis_lPop, 0, 1, Redis, MAY_BE_BOOL|MAY_BE_STRING|MAY_BE_ARRAY)
483491
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
484492
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, count, IS_LONG, 0, "0")
@@ -1250,6 +1258,7 @@ ZEND_METHOD(Redis, keys);
12501258
ZEND_METHOD(Redis, lInsert);
12511259
ZEND_METHOD(Redis, lLen);
12521260
ZEND_METHOD(Redis, lMove);
1261+
ZEND_METHOD(Redis, blmove);
12531262
ZEND_METHOD(Redis, lPop);
12541263
ZEND_METHOD(Redis, lPos);
12551264
ZEND_METHOD(Redis, lPush);
@@ -1501,6 +1510,7 @@ static const zend_function_entry class_Redis_methods[] = {
15011510
ZEND_ME(Redis, lInsert, arginfo_class_Redis_lInsert, ZEND_ACC_PUBLIC)
15021511
ZEND_ME(Redis, lLen, arginfo_class_Redis_lLen, ZEND_ACC_PUBLIC)
15031512
ZEND_ME(Redis, lMove, arginfo_class_Redis_lMove, ZEND_ACC_PUBLIC)
1513+
ZEND_ME(Redis, blmove, arginfo_class_Redis_blmove, ZEND_ACC_PUBLIC)
15041514
ZEND_ME(Redis, lPop, arginfo_class_Redis_lPop, ZEND_ACC_PUBLIC)
15051515
ZEND_ME(Redis, lPos, arginfo_class_Redis_lPos, ZEND_ACC_PUBLIC)
15061516
ZEND_ME(Redis, lPush, arginfo_class_Redis_lPush, ZEND_ACC_PUBLIC)

redis_cluster.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,14 @@ PHP_METHOD(RedisCluster, brpoplpush) {
969969
}
970970
/* }}} */
971971

972+
PHP_METHOD(RedisCluster, lmove) {
973+
CLUSTER_PROCESS_KW_CMD("LMOVE", redis_lmove_cmd, cluster_bulk_resp, 0);
974+
}
975+
976+
PHP_METHOD(RedisCluster, blmove) {
977+
CLUSTER_PROCESS_KW_CMD("BLMOVE", redis_lmove_cmd, cluster_bulk_resp, 0);
978+
}
979+
972980
/* {{{ proto long RedisCluster::llen(string key) */
973981
PHP_METHOD(RedisCluster, llen) {
974982
CLUSTER_PROCESS_KW_CMD("LLEN", redis_key_cmd, cluster_long_resp, 1);

redis_cluster.stub.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,21 @@ public function brpop(string|array $key, string|float|int $timeout_or_key, mixed
147147
*/
148148
public function brpoplpush(string $srckey, string $deskey, int $timeout): mixed;
149149

150+
/**
151+
* Move an element from one list into another.
152+
*
153+
* @see Redis::lmove
154+
*/
155+
public function lmove(string $src, string $dst, string $wherefrom, string $whereto): Redis|string|false;
156+
157+
/**
158+
* Move an element from one list to another, blocking up to a timeout until an element is available.
159+
*
160+
* @see Redis::blmove
161+
*
162+
*/
163+
public function blmove(string $src, string $dst, string $wherefrom, string $whereto, float $timeout): Redis|string|false;
164+
150165
/**
151166
* @see Redis::bzpopmax
152167
*/

redis_cluster_arginfo.h

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 6b0a73d60de6e892ecaaabfe5f69245ebf225fee */
2+
* Stub hash: 4746475a398a16ba176367a0fbc1c9f7e2c5241d */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster___construct, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 1)
@@ -94,6 +94,21 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_RedisCluster_brpoplpush, 0
9494
ZEND_ARG_TYPE_INFO(0, timeout, IS_LONG, 0)
9595
ZEND_END_ARG_INFO()
9696

97+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_RedisCluster_lmove, 0, 4, Redis, MAY_BE_STRING|MAY_BE_FALSE)
98+
ZEND_ARG_TYPE_INFO(0, src, IS_STRING, 0)
99+
ZEND_ARG_TYPE_INFO(0, dst, IS_STRING, 0)
100+
ZEND_ARG_TYPE_INFO(0, wherefrom, IS_STRING, 0)
101+
ZEND_ARG_TYPE_INFO(0, whereto, IS_STRING, 0)
102+
ZEND_END_ARG_INFO()
103+
104+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_RedisCluster_blmove, 0, 5, Redis, MAY_BE_STRING|MAY_BE_FALSE)
105+
ZEND_ARG_TYPE_INFO(0, src, IS_STRING, 0)
106+
ZEND_ARG_TYPE_INFO(0, dst, IS_STRING, 0)
107+
ZEND_ARG_TYPE_INFO(0, wherefrom, IS_STRING, 0)
108+
ZEND_ARG_TYPE_INFO(0, whereto, IS_STRING, 0)
109+
ZEND_ARG_TYPE_INFO(0, timeout, IS_DOUBLE, 0)
110+
ZEND_END_ARG_INFO()
111+
97112
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_RedisCluster_bzpopmax, 0, 2, IS_ARRAY, 0)
98113
ZEND_ARG_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY, NULL)
99114
ZEND_ARG_TYPE_MASK(0, timeout_or_key, MAY_BE_STRING|MAY_BE_LONG, NULL)
@@ -984,6 +999,8 @@ ZEND_METHOD(RedisCluster, bitpos);
984999
ZEND_METHOD(RedisCluster, blpop);
9851000
ZEND_METHOD(RedisCluster, brpop);
9861001
ZEND_METHOD(RedisCluster, brpoplpush);
1002+
ZEND_METHOD(RedisCluster, lmove);
1003+
ZEND_METHOD(RedisCluster, blmove);
9871004
ZEND_METHOD(RedisCluster, bzpopmax);
9881005
ZEND_METHOD(RedisCluster, bzpopmin);
9891006
ZEND_METHOD(RedisCluster, bzmpop);
@@ -1196,6 +1213,8 @@ static const zend_function_entry class_RedisCluster_methods[] = {
11961213
ZEND_ME(RedisCluster, blpop, arginfo_class_RedisCluster_blpop, ZEND_ACC_PUBLIC)
11971214
ZEND_ME(RedisCluster, brpop, arginfo_class_RedisCluster_brpop, ZEND_ACC_PUBLIC)
11981215
ZEND_ME(RedisCluster, brpoplpush, arginfo_class_RedisCluster_brpoplpush, ZEND_ACC_PUBLIC)
1216+
ZEND_ME(RedisCluster, lmove, arginfo_class_RedisCluster_lmove, ZEND_ACC_PUBLIC)
1217+
ZEND_ME(RedisCluster, blmove, arginfo_class_RedisCluster_blmove, ZEND_ACC_PUBLIC)
11991218
ZEND_ME(RedisCluster, bzpopmax, arginfo_class_RedisCluster_bzpopmax, ZEND_ACC_PUBLIC)
12001219
ZEND_ME(RedisCluster, bzpopmin, arginfo_class_RedisCluster_bzpopmin, ZEND_ACC_PUBLIC)
12011220
ZEND_ME(RedisCluster, bzmpop, arginfo_class_RedisCluster_bzmpop, ZEND_ACC_PUBLIC)

redis_cluster_legacy_arginfo.h

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 6b0a73d60de6e892ecaaabfe5f69245ebf225fee */
2+
* Stub hash: 4746475a398a16ba176367a0fbc1c9f7e2c5241d */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster___construct, 0, 0, 1)
55
ZEND_ARG_INFO(0, name)
@@ -87,6 +87,21 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster_brpoplpush, 0, 0, 3)
8787
ZEND_ARG_INFO(0, timeout)
8888
ZEND_END_ARG_INFO()
8989

90+
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster_lmove, 0, 0, 4)
91+
ZEND_ARG_INFO(0, src)
92+
ZEND_ARG_INFO(0, dst)
93+
ZEND_ARG_INFO(0, wherefrom)
94+
ZEND_ARG_INFO(0, whereto)
95+
ZEND_END_ARG_INFO()
96+
97+
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster_blmove, 0, 0, 5)
98+
ZEND_ARG_INFO(0, src)
99+
ZEND_ARG_INFO(0, dst)
100+
ZEND_ARG_INFO(0, wherefrom)
101+
ZEND_ARG_INFO(0, whereto)
102+
ZEND_ARG_INFO(0, timeout)
103+
ZEND_END_ARG_INFO()
104+
90105
#define arginfo_class_RedisCluster_bzpopmax arginfo_class_RedisCluster_blpop
91106

92107
#define arginfo_class_RedisCluster_bzpopmin arginfo_class_RedisCluster_blpop
@@ -835,6 +850,8 @@ ZEND_METHOD(RedisCluster, bitpos);
835850
ZEND_METHOD(RedisCluster, blpop);
836851
ZEND_METHOD(RedisCluster, brpop);
837852
ZEND_METHOD(RedisCluster, brpoplpush);
853+
ZEND_METHOD(RedisCluster, lmove);
854+
ZEND_METHOD(RedisCluster, blmove);
838855
ZEND_METHOD(RedisCluster, bzpopmax);
839856
ZEND_METHOD(RedisCluster, bzpopmin);
840857
ZEND_METHOD(RedisCluster, bzmpop);
@@ -1047,6 +1064,8 @@ static const zend_function_entry class_RedisCluster_methods[] = {
10471064
ZEND_ME(RedisCluster, blpop, arginfo_class_RedisCluster_blpop, ZEND_ACC_PUBLIC)
10481065
ZEND_ME(RedisCluster, brpop, arginfo_class_RedisCluster_brpop, ZEND_ACC_PUBLIC)
10491066
ZEND_ME(RedisCluster, brpoplpush, arginfo_class_RedisCluster_brpoplpush, ZEND_ACC_PUBLIC)
1067+
ZEND_ME(RedisCluster, lmove, arginfo_class_RedisCluster_lmove, ZEND_ACC_PUBLIC)
1068+
ZEND_ME(RedisCluster, blmove, arginfo_class_RedisCluster_blmove, ZEND_ACC_PUBLIC)
10501069
ZEND_ME(RedisCluster, bzpopmax, arginfo_class_RedisCluster_bzpopmax, ZEND_ACC_PUBLIC)
10511070
ZEND_ME(RedisCluster, bzpopmin, arginfo_class_RedisCluster_bzpopmin, ZEND_ACC_PUBLIC)
10521071
ZEND_ME(RedisCluster, bzmpop, arginfo_class_RedisCluster_bzmpop, ZEND_ACC_PUBLIC)

redis_commands.c

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3321,35 +3321,52 @@ int redis_setbit_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
33213321
return SUCCESS;
33223322
}
33233323

3324-
int
3325-
redis_lmove_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
3326-
char **cmd, int *cmd_len, short *slot, void **ctx)
3324+
int redis_lmove_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
3325+
char *kw, char **cmd, int *cmd_len, short *slot, void **ctx)
33273326
{
3328-
char *src, *dst, *from, *to;
3329-
size_t src_len, dst_len, from_len, to_len;
3327+
zend_string *src = NULL, *dst = NULL, *from = NULL, *to = NULL;
3328+
smart_string cmdstr = {0};
3329+
double timeout = 0.0;
3330+
short slot2 = 0;
3331+
int blocking;
33303332

3331-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssss",
3332-
&src, &src_len, &dst, &dst_len,
3333-
&from, &from_len, &to, &to_len) == FAILURE
3334-
) {
3333+
blocking = toupper(*kw) == 'B';
3334+
3335+
ZEND_PARSE_PARAMETERS_START(4 + !!blocking, 4 + !!blocking)
3336+
Z_PARAM_STR(src)
3337+
Z_PARAM_STR(dst)
3338+
Z_PARAM_STR(from)
3339+
Z_PARAM_STR(to)
3340+
if (blocking) {
3341+
Z_PARAM_DOUBLE(timeout)
3342+
}
3343+
ZEND_PARSE_PARAMETERS_END_EX(return FAILURE);
3344+
3345+
if (!zend_string_equals_literal_ci(from, "LEFT") && !zend_string_equals_literal_ci(from, "RIGHT")) {
3346+
php_error_docref(NULL, E_WARNING, "Wherefrom argument must be 'LEFT' or 'RIGHT'");
3347+
return FAILURE;
3348+
} else if (!zend_string_equals_literal_ci(to, "LEFT") && !zend_string_equals_literal_ci(to, "RIGHT")) {
3349+
php_error_docref(NULL, E_WARNING, "Whereto argument must be 'LEFT' or 'RIGHT'");
33353350
return FAILURE;
33363351
}
33373352

3338-
// Validate wherefrom/whereto
3339-
if (strcasecmp(from, "left") != 0 && strcasecmp(from, "right") != 0) {
3340-
php_error_docref(NULL, E_WARNING,
3341-
"Wherefrom argument must be either 'LEFT' or 'RIGHT'");
3342-
return FAILURE;
3343-
} else if (strcasecmp(to, "left") != 0 && strcasecmp(to, "right") != 0) {
3344-
php_error_docref(NULL, E_WARNING,
3345-
"Whereto argument must be either 'LEFT' or 'RIGHT'");
3353+
redis_cmd_init_sstr(&cmdstr, 4 + !!blocking, kw, strlen(kw));
3354+
redis_cmd_append_sstr_key_zstr(&cmdstr, src, redis_sock, slot);
3355+
redis_cmd_append_sstr_key_zstr(&cmdstr, dst, redis_sock, slot ? &slot2 : NULL);
3356+
3357+
/* Protect the user from CROSSLOT errors */
3358+
if (slot && slot2 != *slot) {
3359+
php_error_docref(NULL, E_WARNING, "Both keys must hash to the same slot!");
3360+
efree(cmdstr.c);
33463361
return FAILURE;
33473362
}
33483363

3349-
/* Construct command */
3350-
*cmd_len = REDIS_CMD_SPPRINTF(cmd, "LMOVE", "kkss",
3351-
src, src_len, dst, dst_len,
3352-
from, from_len, to, to_len);
3364+
redis_cmd_append_sstr_zstr(&cmdstr, from);
3365+
redis_cmd_append_sstr_zstr(&cmdstr, to);
3366+
if (blocking) redis_cmd_append_sstr_dbl(&cmdstr, timeout);
3367+
3368+
*cmd = cmdstr.c;
3369+
*cmd_len = cmdstr.len;
33533370

33543371
return SUCCESS;
33553372
}

redis_commands.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,6 @@ int redis_auth_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
242242
int redis_setbit_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
243243
char **cmd, int *cmd_len, short *slot, void **ctx);
244244

245-
int redis_lmove_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
246-
char **cmd, int *cmd_len, short *slot, void **ctx);
247-
248245
int redis_linsert_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
249246
char **cmd, int *cmd_len, short *slot, void **ctx);
250247

@@ -333,9 +330,11 @@ int redis_xreadgroup_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
333330
int redis_xtrim_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
334331
char **cmd, int *cmd_len, short *slot, void **ctx);
335332

333+
int redis_lmove_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
334+
char *kw, char **cmd, int *cmd_len, short *slot, void **ctx);
335+
336336
int redis_expire_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
337-
char *kw, char **cmd, int *cmd_len, short *slot,
338-
void **ctx);
337+
char *kw, char **cmd, int *cmd_len, short *slot, void **ctx);
339338

340339
int redis_varkey_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
341340
char *kw, char **cmd, int *cmd_len, short *slot,

redis_legacy_arginfo.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: a22731395ec32eed913fde7b2de60758fb1e75da */
2+
* Stub hash: 399e9506bc58ff0da1abc8f46a02b2499ed1223a */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Redis___construct, 0, 0, 0)
55
ZEND_ARG_INFO(0, options)
@@ -427,6 +427,14 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Redis_lMove, 0, 0, 4)
427427
ZEND_ARG_INFO(0, whereto)
428428
ZEND_END_ARG_INFO()
429429

430+
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Redis_blmove, 0, 0, 5)
431+
ZEND_ARG_INFO(0, src)
432+
ZEND_ARG_INFO(0, dst)
433+
ZEND_ARG_INFO(0, wherefrom)
434+
ZEND_ARG_INFO(0, whereto)
435+
ZEND_ARG_INFO(0, timeout)
436+
ZEND_END_ARG_INFO()
437+
430438
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Redis_lPop, 0, 0, 1)
431439
ZEND_ARG_INFO(0, key)
432440
ZEND_ARG_INFO(0, count)
@@ -1090,6 +1098,7 @@ ZEND_METHOD(Redis, keys);
10901098
ZEND_METHOD(Redis, lInsert);
10911099
ZEND_METHOD(Redis, lLen);
10921100
ZEND_METHOD(Redis, lMove);
1101+
ZEND_METHOD(Redis, blmove);
10931102
ZEND_METHOD(Redis, lPop);
10941103
ZEND_METHOD(Redis, lPos);
10951104
ZEND_METHOD(Redis, lPush);
@@ -1341,6 +1350,7 @@ static const zend_function_entry class_Redis_methods[] = {
13411350
ZEND_ME(Redis, lInsert, arginfo_class_Redis_lInsert, ZEND_ACC_PUBLIC)
13421351
ZEND_ME(Redis, lLen, arginfo_class_Redis_lLen, ZEND_ACC_PUBLIC)
13431352
ZEND_ME(Redis, lMove, arginfo_class_Redis_lMove, ZEND_ACC_PUBLIC)
1353+
ZEND_ME(Redis, blmove, arginfo_class_Redis_blmove, ZEND_ACC_PUBLIC)
13441354
ZEND_ME(Redis, lPop, arginfo_class_Redis_lPop, ZEND_ACC_PUBLIC)
13451355
ZEND_ME(Redis, lPos, arginfo_class_Redis_lPos, ZEND_ACC_PUBLIC)
13461356
ZEND_ME(Redis, lPush, arginfo_class_Redis_lPush, ZEND_ACC_PUBLIC)

0 commit comments

Comments
 (0)