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

Function lua_toboolean

depends/lua/src/lapi.c:367–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365
366
367LUA_API int lua_toboolean (lua_State *L, int idx) {
368 const TValue *o = index2addr(L, idx);
369 return !l_isfalse(o);
370}
371
372
373LUA_API const char *lua_tolstring (lua_State *L, int idx, size_t *len) {

Callers 15

is_builtinMethod · 0.85
run_dfhack_initFunction · 0.85
PushModuleMethod · 0.85
dfhack_cleanup_contFunction · 0.85
lua_writeMethod · 0.85
autovivify_ptrFunction · 0.85
lua_item_writeMethod · 0.85
meta_bitfield_newindexFunction · 0.85
get_bool_fieldFunction · 0.85
decode_penFunction · 0.85
dfhack_matinfo_toStringFunction · 0.85

Calls 1

index2addrFunction · 0.85

Tested by 1

do_commandFunction · 0.68