Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
0f5f7e9a
Commit
0f5f7e9a
authored
Nov 12, 2009
by
antirez
Browse files
LPOPPUSH renamed into RPOPLPUSH
parent
405b0a6a
Changes
2
Hide whitespace changes
Inline
Side-by-side
redis-cli.c
View file @
0f5f7e9a
...
@@ -76,7 +76,7 @@ static struct redisCommand cmdTable[] = {
...
@@ -76,7 +76,7 @@ static struct redisCommand cmdTable[] = {
{
"lrange"
,
4
,
REDIS_CMD_INLINE
},
{
"lrange"
,
4
,
REDIS_CMD_INLINE
},
{
"ltrim"
,
4
,
REDIS_CMD_INLINE
},
{
"ltrim"
,
4
,
REDIS_CMD_INLINE
},
{
"lrem"
,
4
,
REDIS_CMD_BULK
},
{
"lrem"
,
4
,
REDIS_CMD_BULK
},
{
"
l
poppush"
,
3
,
REDIS_CMD_BULK
},
{
"
r
pop
l
push"
,
3
,
REDIS_CMD_BULK
},
{
"sadd"
,
3
,
REDIS_CMD_BULK
},
{
"sadd"
,
3
,
REDIS_CMD_BULK
},
{
"srem"
,
3
,
REDIS_CMD_BULK
},
{
"srem"
,
3
,
REDIS_CMD_BULK
},
{
"smove"
,
4
,
REDIS_CMD_BULK
},
{
"smove"
,
4
,
REDIS_CMD_BULK
},
...
...
redis.c
View file @
0f5f7e9a
...
@@ -446,7 +446,7 @@ static void flushdbCommand(redisClient *c);
...
@@ -446,7 +446,7 @@ static void flushdbCommand(redisClient *c);
static
void
flushallCommand
(
redisClient
*
c
);
static
void
flushallCommand
(
redisClient
*
c
);
static
void
sortCommand
(
redisClient
*
c
);
static
void
sortCommand
(
redisClient
*
c
);
static
void
lremCommand
(
redisClient
*
c
);
static
void
lremCommand
(
redisClient
*
c
);
static
void
l
poppush
C
ommand
(
redisClient
*
c
);
static
void
r
pop
l
push
c
ommand
(
redisClient
*
c
);
static
void
infoCommand
(
redisClient
*
c
);
static
void
infoCommand
(
redisClient
*
c
);
static
void
mgetCommand
(
redisClient
*
c
);
static
void
mgetCommand
(
redisClient
*
c
);
static
void
monitorCommand
(
redisClient
*
c
);
static
void
monitorCommand
(
redisClient
*
c
);
...
@@ -490,7 +490,7 @@ static struct redisCommand cmdTable[] = {
...
@@ -490,7 +490,7 @@ static struct redisCommand cmdTable[] = {
{
"lrange"
,
lrangeCommand
,
4
,
REDIS_CMD_INLINE
},
{
"lrange"
,
lrangeCommand
,
4
,
REDIS_CMD_INLINE
},
{
"ltrim"
,
ltrimCommand
,
4
,
REDIS_CMD_INLINE
},
{
"ltrim"
,
ltrimCommand
,
4
,
REDIS_CMD_INLINE
},
{
"lrem"
,
lremCommand
,
4
,
REDIS_CMD_BULK
},
{
"lrem"
,
lremCommand
,
4
,
REDIS_CMD_BULK
},
{
"
l
poppush"
,
l
poppush
C
ommand
,
3
,
REDIS_CMD_BULK
},
{
"
r
pop
l
push"
,
r
pop
l
push
c
ommand
,
3
,
REDIS_CMD_BULK
},
{
"sadd"
,
saddCommand
,
3
,
REDIS_CMD_BULK
|
REDIS_CMD_DENYOOM
},
{
"sadd"
,
saddCommand
,
3
,
REDIS_CMD_BULK
|
REDIS_CMD_DENYOOM
},
{
"srem"
,
sremCommand
,
3
,
REDIS_CMD_BULK
},
{
"srem"
,
sremCommand
,
3
,
REDIS_CMD_BULK
},
{
"smove"
,
smoveCommand
,
4
,
REDIS_CMD_BULK
},
{
"smove"
,
smoveCommand
,
4
,
REDIS_CMD_BULK
},
...
@@ -3473,7 +3473,7 @@ static void lremCommand(redisClient *c) {
...
@@ -3473,7 +3473,7 @@ static void lremCommand(redisClient *c) {
}
}
/* This is the semantic of this command:
/* This is the semantic of this command:
*
L
POPPUSH srclist dstlist:
*
R
POP
L
PUSH srclist dstlist:
* IF LLEN(srclist) > 0
* IF LLEN(srclist) > 0
* element = RPOP srclist
* element = RPOP srclist
* LPUSH dstlist element
* LPUSH dstlist element
...
@@ -3487,7 +3487,7 @@ static void lremCommand(redisClient *c) {
...
@@ -3487,7 +3487,7 @@ static void lremCommand(redisClient *c) {
* since the element is not just returned but pushed against another list
* since the element is not just returned but pushed against another list
* as well. This command was originally proposed by Ezra Zygmuntowicz.
* as well. This command was originally proposed by Ezra Zygmuntowicz.
*/
*/
static
void
l
poppush
C
ommand
(
redisClient
*
c
)
{
static
void
r
pop
l
push
c
ommand
(
redisClient
*
c
)
{
robj
*
sobj
;
robj
*
sobj
;
sobj
=
lookupKeyWrite
(
c
->
db
,
c
->
argv
[
1
]);
sobj
=
lookupKeyWrite
(
c
->
db
,
c
->
argv
[
1
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment