Repository: redis/redis

Issue:
Confusing docs: RedisModule_GetSharedAPI
https://redis.io/docs/reference/modules/modules-api-ref/#section-modules-api-exporting-importing - the example `getExternalAPIs` confuses me. It calls `RedisModule_GetOtherModuleAPIs` which looks like it should be part of the redis module api, but as far as I can see that doesn't exist. Presumably this is intended to illustrate the use use 
 of `RedisModule_GetSharedAPI`, so perhaps that's what's intended? But that needs the context which isn't passed in to `getExternalAPIs` in this example. 

An example illustrating the use of `RedisModule_GetSharedAPI` that will compile and run unmodified would be a great help.



Discussion:
@PaulRudin The example is wrong, `RedisModule_GetOtherModuleAPIs` should really be `RedisModule_GetSharedAPI`.

Patch:
diff --git a/src/module.c b/src/module.c
index 2656e97491a..e0a80a5c149 100644
--- a/src/module.c
+++ b/src/module.c
@@ -9877,7 +9877,7 @@ int RM_ExportSharedAPI(RedisModuleCtx *ctx, const char *apiname, void *func) {
  *         static int api_loaded = 0;
  *         if (api_loaded != 0) return 1; // APIs already resolved.
  *
- *         myFunctionPointer = RedisModule_GetOtherModuleAPI("...");
+ *         myFunctionPointer = RedisModule_GetSharedAPI("...");
  *         if (myFunctionPointer == NULL) return 0;
  *
  *         return 1;