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
60250f50
Unverified
Commit
60250f50
authored
May 18, 2022
by
Binbin
Committed by
GitHub
May 18, 2022
Browse files
Fix typos in module comment / documentation (#10740)
minor cleanup in redismodule.h and module.c
parent
f62d52a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
60250f50
...
...
@@ -1442,7 +1442,7 @@ moduleCmdArgAt(const RedisModuleCommandInfoVersion *version,
* begin search step. (Usually it's just after `keynumidx`, in
* which case it should be set to `keynumidx + 1`.)
*
* * `keystep`: How many arguments
s
should we skip after finding a
* * `keystep`: How many arguments should we skip after finding a
* key, in order to find the next one?
*
* Key-spec flags:
...
...
@@ -1767,7 +1767,7 @@ static int moduleValidateCommandInfo(const RedisModuleCommandInfo *info) {
if
(
!
isPowerOfTwo
(
spec
->
flags
&
key_flags
))
{
serverLog
(
LL_WARNING
,
"Invalid command info: key_specs[%zd].flags: "
"Exactly one of the flags RO, RW, OW, RM reqired"
,
j
);
"Exactly one of the flags RO, RW, OW, RM req
u
ired"
,
j
);
return
0
;
}
if
((
spec
->
flags
&
write_flags
)
!=
0
&&
...
...
@@ -2837,7 +2837,7 @@ int RM_ReplyWithSet(RedisModuleCtx *ctx, long len) {
* actual reply. see https://github.com/antirez/RESP3/blob/master/spec.md#attribute-type
*
* After starting an attributes reply, the module must make `len*2` calls to other
* `ReplyWith*` style functions in order to emit the elements of the attrib
t
ute map.
* `ReplyWith*` style functions in order to emit the elements of the attribute map.
* See Reply APIs section for more details.
*
* Use RM_ReplySetAttributeLength() to set deferred length.
...
...
@@ -3984,7 +3984,7 @@ int RM_StringTruncate(RedisModuleKey *key, size_t newlen) {
* RM_ListInsert, the internal iterator is invalidated so the next operation
* will require a linear seek.
*
* Modifying a list in any another way, for examle using RM_Call(), while a key
* Modifying a list in any another way, for exam
p
le using RM_Call(), while a key
* is open will confuse the internal iterator and may cause trouble if the key
* is used after such modifications. The key must be reopened in this case.
*
...
...
@@ -5666,14 +5666,14 @@ fmterr:
* same as the client attached to the given RedisModuleCtx. This will
* probably used when you want to pass the reply directly to the client.
* * `C` -- Check if command can be executed according to ACL rules.
* *
'S'
-- Run the command in a script mode, this means that it will raise
* *
`S`
-- Run the command in a script mode, this means that it will raise
* an error if a command which are not allowed inside a script
* (flagged with the `deny-script` flag) is invoked (like SHUTDOWN).
* In addition, on script mode, write commands are not allowed if there are
* not enough good replicas (as configured with `min-replicas-to-write`)
* or when the server is unable to persist to the disk.
* *
'W'
-- Do not allow to run any write command (flagged with the `write` flag).
* *
'E'
-- Return error as RedisModuleCallReply. If there is an error before
* *
`W`
-- Do not allow to run any write command (flagged with the `write` flag).
* *
`E`
-- Return error as RedisModuleCallReply. If there is an error before
* invoking the command, the error is returned using errno mechanism.
* This flag allows to get the error also as an error CallReply with
* relevant error message.
...
...
@@ -8661,7 +8661,7 @@ int RM_ACLCheckKeyPermissions(RedisModuleUser *user, RedisModuleString *key, int
* access flags. See RM_ChannelAtPosWithFlags for more information about the
* possible flags that can be passed in.
*
* If the user is able to ac
e
css the pubsub channel then REDISMODULE_OK is returned, otherwise
* If the user is able to acc
e
ss the pubsub channel then REDISMODULE_OK is returned, otherwise
* REDISMODULE_ERR is returned and errno is set to one of the following values:
*
* * EINVAL: The provided flags are invalid.
...
...
@@ -12052,7 +12052,7 @@ int *RM_GetCommandKeysWithFlags(RedisModuleCtx *ctx, RedisModuleString **argv, i
return
res
;
}
/* Identi
n
al to RM_GetCommandKeysWithFlags when flags are not needed. */
/* Identi
c
al to RM_GetCommandKeysWithFlags when flags are not needed. */
int
*
RM_GetCommandKeys
(
RedisModuleCtx
*
ctx
,
RedisModuleString
**
argv
,
int
argc
,
int
*
num_keys
)
{
return
RM_GetCommandKeysWithFlags
(
ctx
,
argv
,
argc
,
num_keys
,
NULL
);
}
...
...
src/redismodule.h
View file @
60250f50
...
...
@@ -249,7 +249,7 @@ typedef uint64_t RedisModuleTimerID;
/* When set, Redis will not call RedisModule_SignalModifiedKey(), implicitly in
* RedisModule_CloseKey, and the module needs to do that when manually when keys
* are modified from the user's
s
perspective, to invalidate WATCH. */
* are modified from the user's perspective, to invalidate WATCH. */
#define REDISMODULE_OPTION_NO_IMPLICIT_SIGNAL_MODIFIED (1<<1)
/* Declare that the module can handle diskless async replication with RedisModule_SetModuleOptions. */
...
...
@@ -347,7 +347,7 @@ typedef struct {
const
char
*
keyword
;
/* An index in argv from which to start searching.
* Can be negative, which means start search from the end, in reverse
* (Example: -2 means to start in reverse from the p
a
nultimate arg) */
* (Example: -2 means to start in reverse from the p
e
nultimate arg) */
int
startfrom
;
}
keyword
;
}
bs
;
...
...
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