MCPcopy Create free account
hub / github.com/DFHack/dfhack / makemask

Function makemask

depends/lua/src/ldblib.c:324–331  ·  view source on GitHub ↗

** Convert a string mask (for 'sethook') into a bit mask */

Source from the content-addressed store, hash-verified

322** Convert a string mask (for 'sethook') into a bit mask
323*/
324static int makemask (const char *smask, int count) {
325 int mask = 0;
326 if (strchr(smask, 'c')) mask |= LUA_MASKCALL;
327 if (strchr(smask, 'r')) mask |= LUA_MASKRET;
328 if (strchr(smask, 'l')) mask |= LUA_MASKLINE;
329 if (count > 0) mask |= LUA_MASKCOUNT;
330 return mask;
331}
332
333
334/*

Callers 1

db_sethookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected