module: fix typo in REGISTER_API (#608)

`REGISTER_API` is supposed to register two functions: one starts with
`ValkeyModule_` and the other one with `RedisModule_`. It does so in
`unstable` branch. However there was a copy-paste mistake during
backporting it to 7.2. This caused modules built with `valkeymodule-rs`
to fail since they called `RedisModule_SetModuleAttribs` which caused
valkey to segfault.

This commit fixes the typo.

Signed-off-by: Mikhail Koviazin <mikhail.koviazin@aiven.io>
This commit is contained in:
Mikhail Koviazin 2024-06-07 10:24:41 +03:00 committed by GitHub
parent 26388270f1
commit 8c2a76f584
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11825,7 +11825,7 @@ int moduleRegisterApi(const char *funcname, void *funcptr) {
* so that legacy Redis module binaries can continue to function */
#define REGISTER_API(name) \
moduleRegisterApi("ValkeyModule_" #name, (void *)(unsigned long)VM_ ## name);\
moduleRegisterApi("ValkeyModule_" #name, (void *)(unsigned long)VM_ ## name);\
moduleRegisterApi("RedisModule_" #name, (void *)(unsigned long)VM_ ## name);\
/* Global initialization at Redis startup. */
void moduleRegisterCoreAPI(void);