MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / moduleTypeNameByID

Function moduleTypeNameByID

src/module.cpp:4469–4479  ·  view source on GitHub ↗

Turn an (unresolved) module ID into a type name, to show the user an * error when RDB files contain module data we can't load. * The buffer pointed by 'name' must be 10 bytes at least. The function will * fill it with a null terminated module name. */

Source from the content-addressed store, hash-verified

4467 * The buffer pointed by 'name' must be 10 bytes at least. The function will
4468 * fill it with a null terminated module name. */
4469void moduleTypeNameByID(char *name, uint64_t moduleid) {
4470 const char *cset = ModuleTypeNameCharSet;
4471
4472 name[9] = '\0';
4473 char *p = name+8;
4474 moduleid >>= 10;
4475 for (int j = 0; j < 9; j++) {
4476 *p-- = cset[moduleid & 63];
4477 moduleid >>= 6;
4478 }
4479}
4480
4481/* Return the name of the module that owns the specified moduleType. */
4482const char *moduleTypeModuleName(moduleType *mt) {

Callers 3

rdbLoadObjectFunction · 0.85
rdbLoadRioFunction · 0.85
redis_check_rdbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected