MCPcopy Create free account
hub / github.com/NetHack/NetHack / start_luapat

Function start_luapat

src/nhlua.c:2658–2676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2656 */
2657#ifdef notyet
2658staticfn boolean
2659start_luapat(void)
2660{
2661 int rv;
2662 /* XXX set memory and step limits */
2663 nhl_sandbox_info sbi = { NHL_SB_STRING, 0, 0, 0 };
2664
2665 if ((luapat = nhl_init(&sbi)) == NULL)
2666 return FALSE;
2667
2668 /* load a pattern matching function */
2669 rv = luaL_loadstring(
2670 luapat,
2671 "function matches(s,p) return not not stringm.match(s,p) end");
2672 if (rv != LUA_OK) {
2673 panic("start_luapat: %d", rv);
2674 }
2675 return TRUE;
2676}
2677#endif
2678
2679staticfn void

Callers 1

hooked_openFunction · 0.85

Calls 2

nhl_initFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected