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
2967c00c
Commit
2967c00c
authored
Apr 05, 2016
by
antirez
Browse files
Modules: RedisModule_ReplyWithNull() implemented.
parent
e711a9ac
Changes
2
Show whitespace changes
Inline
Side-by-side
src/module.c
View file @
2967c00c
...
@@ -464,6 +464,12 @@ int RM_ReplyWithString(RedisModuleCtx *ctx, RedisModuleString *str) {
...
@@ -464,6 +464,12 @@ int RM_ReplyWithString(RedisModuleCtx *ctx, RedisModuleString *str) {
return
REDISMODULE_OK
;
return
REDISMODULE_OK
;
}
}
/* Reply with NULL. */
int
RedisModule_ReplyWithNull
(
RedisModuleCtx
*
ctx
)
{
addReply
(
ctx
->
client
,
shared
.
nullbulk
);
return
REDISMODULE_OK
;
}
/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
* Commands replication API
* Commands replication API
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
...
@@ -1197,6 +1203,7 @@ void moduleRegisterCoreAPI(void) {
...
@@ -1197,6 +1203,7 @@ void moduleRegisterCoreAPI(void) {
REGISTER_API
(
ReplyWithArray
);
REGISTER_API
(
ReplyWithArray
);
REGISTER_API
(
ReplyWithString
);
REGISTER_API
(
ReplyWithString
);
REGISTER_API
(
ReplyWithStringBuffer
);
REGISTER_API
(
ReplyWithStringBuffer
);
REGISTER_API
(
ReplyWithNull
);
REGISTER_API
(
GetSelectedDb
);
REGISTER_API
(
GetSelectedDb
);
REGISTER_API
(
SelectDb
);
REGISTER_API
(
SelectDb
);
REGISTER_API
(
OpenKey
);
REGISTER_API
(
OpenKey
);
...
...
src/redismodule.h
View file @
2967c00c
...
@@ -85,6 +85,7 @@ int REDISMODULE_API_FUNC(RedisModule_ReplyWithSimpleString)(RedisModuleCtx *ctx,
...
@@ -85,6 +85,7 @@ int REDISMODULE_API_FUNC(RedisModule_ReplyWithSimpleString)(RedisModuleCtx *ctx,
int
REDISMODULE_API_FUNC
(
RedisModule_ReplyWithArray
)(
RedisModuleCtx
*
ctx
,
int
len
);
int
REDISMODULE_API_FUNC
(
RedisModule_ReplyWithArray
)(
RedisModuleCtx
*
ctx
,
int
len
);
int
REDISMODULE_API_FUNC
(
RedisModule_ReplyWithStringBuffer
)(
RedisModuleCtx
*
ctx
,
const
char
*
buf
,
size_t
len
);
int
REDISMODULE_API_FUNC
(
RedisModule_ReplyWithStringBuffer
)(
RedisModuleCtx
*
ctx
,
const
char
*
buf
,
size_t
len
);
int
REDISMODULE_API_FUNC
(
RedisModule_ReplyWithString
)(
RedisModuleCtx
*
ctx
,
RedisModuleString
*
str
);
int
REDISMODULE_API_FUNC
(
RedisModule_ReplyWithString
)(
RedisModuleCtx
*
ctx
,
RedisModuleString
*
str
);
int
REDISMODULE_API_FUNC
(
RedisModule_ReplyWithNull
)(
RedisModuleCtx
*
ctx
);
int
REDISMODULE_API_FUNC
(
RedisModule_StringToLongLong
)(
RedisModuleString
*
str
,
long
long
*
ll
);
int
REDISMODULE_API_FUNC
(
RedisModule_StringToLongLong
)(
RedisModuleString
*
str
,
long
long
*
ll
);
void
REDISMODULE_API_FUNC
(
RedisModule_AutoMemory
)(
RedisModuleCtx
*
ctx
);
void
REDISMODULE_API_FUNC
(
RedisModule_AutoMemory
)(
RedisModuleCtx
*
ctx
);
int
REDISMODULE_API_FUNC
(
RedisModule_Replicate
)(
RedisModuleCtx
*
ctx
,
const
char
*
cmdname
,
const
char
*
fmt
,
...);
int
REDISMODULE_API_FUNC
(
RedisModule_Replicate
)(
RedisModuleCtx
*
ctx
,
const
char
*
cmdname
,
const
char
*
fmt
,
...);
...
@@ -109,6 +110,7 @@ static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int
...
@@ -109,6 +110,7 @@ static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int
REDISMODULE_GET_API
(
ReplyWithArray
);
REDISMODULE_GET_API
(
ReplyWithArray
);
REDISMODULE_GET_API
(
ReplyWithStringBuffer
);
REDISMODULE_GET_API
(
ReplyWithStringBuffer
);
REDISMODULE_GET_API
(
ReplyWithString
);
REDISMODULE_GET_API
(
ReplyWithString
);
REDISMODULE_GET_API
(
ReplyWithNull
);
REDISMODULE_GET_API
(
GetSelectedDb
);
REDISMODULE_GET_API
(
GetSelectedDb
);
REDISMODULE_GET_API
(
SelectDb
);
REDISMODULE_GET_API
(
SelectDb
);
REDISMODULE_GET_API
(
OpenKey
);
REDISMODULE_GET_API
(
OpenKey
);
...
...
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