MCPcopy Create free account
hub / github.com/F-Stack/f-stack / moduleUnregisterUsedAPI

Function moduleUnregisterUsedAPI

app/redis-6.2.6/src/module.c:7326–7341  ·  view source on GitHub ↗

Remove the specified module as an user of APIs of ever other module. * This is usually called when a module is unloaded. * * Returns the number of modules this module was using APIs from. */

Source from the content-addressed store, hash-verified

7324 *
7325 * Returns the number of modules this module was using APIs from. */
7326int moduleUnregisterUsedAPI(RedisModule *module) {
7327 listIter li;
7328 listNode *ln;
7329 int count = 0;
7330
7331 listRewind(module->using,&li);
7332 while((ln = listNext(&li))) {
7333 RedisModule *used = ln->value;
7334 listNode *ln = listSearchKey(used->usedby,module);
7335 if (ln) {
7336 listDelNode(used->usedby,ln);
7337 count++;
7338 }
7339 }
7340 return count;
7341}
7342
7343/* Unregister all filters registered by a module.
7344 * This is called when a module is being unloaded.

Callers 2

moduleLoadFunction · 0.85
moduleUnloadFunction · 0.85

Calls 4

listRewindFunction · 0.85
listNextFunction · 0.85
listSearchKeyFunction · 0.85
listDelNodeFunction · 0.85

Tested by

no test coverage detected