Skip to content
Browse files

Cluster: getKeysFromCommand() top comment improved.

  • Loading branch information...
1 parent c0e818a commit ef5e7fbaa20fcda2debd2751d8437d7c2c53b1e0 @antirez committed Mar 10, 2014
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/db.c
View
12 src/db.c
@@ -951,12 +951,18 @@ int *getKeysUsingCommandTable(struct redisCommand *cmd,robj **argv, int argc, in
return keys;
}
-/* Return keys as an heap allocated array of integers. The length of the array
- * is returned by reference into *numkeys.
+/* Return all the arguments that are keys in the command passed via argc / argv.
+ *
+ * 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
* 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) {
return cmd->getkeys_proc(cmd,argv,argc,numkeys);
} else {

0 comments on commit ef5e7fb

Please sign in to comment.
Something went wrong with that request. Please try again.