Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ef5e7fba
Commit
ef5e7fba
authored
Mar 10, 2014
by
antirez
Browse files
Cluster: getKeysFromCommand() top comment improved.
parent
c0e818ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/db.c
View file @
ef5e7fba
...
@@ -951,12 +951,18 @@ int *getKeysUsingCommandTable(struct redisCommand *cmd,robj **argv, int argc, in
...
@@ -951,12 +951,18 @@ int *getKeysUsingCommandTable(struct redisCommand *cmd,robj **argv, int argc, in
return
keys
;
return
keys
;
}
}
/* Return keys as an heap allocated array of integers. The length of the array
/* Return all the arguments that are keys in the command passed via argc / argv.
* is returned by reference into *numkeys.
*
* The command returns the positions of all the key arguments inside the array,
* so the actual return value is an heap allocated array of integers. The
* length of the array is returned by reference into *numkeys.
*
* 'cmd' must be point to the corresponding entry into the redisCommand
* table, according to the command name in argv[0].
*
*
* This function uses the command table if a command-specific helper function
* This function uses the command table if a command-specific helper function
* is not required, otherwise it calls the command-specific function. */
* is not required, otherwise it calls the command-specific function. */
int
*
getKeysFromCommand
(
struct
redisCommand
*
cmd
,
robj
**
argv
,
int
argc
,
int
*
numkeys
)
{
int
*
getKeysFromCommand
(
struct
redisCommand
*
cmd
,
robj
**
argv
,
int
argc
,
int
*
numkeys
)
{
if
(
cmd
->
getkeys_proc
)
{
if
(
cmd
->
getkeys_proc
)
{
return
cmd
->
getkeys_proc
(
cmd
,
argv
,
argc
,
numkeys
);
return
cmd
->
getkeys_proc
(
cmd
,
argv
,
argc
,
numkeys
);
}
else
{
}
else
{
...
...
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