MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / ktablelen

Function ktablelen

other_src/lua/src/lpeg.cpp:953–956  ·  view source on GitHub ↗

** Return the number of elements in the ktable of a pattern. ** in Lua 5.2, default "environment" for patterns is nil, not ** a table. Treat it as an empty table. */

Source from the content-addressed store, hash-verified

951** a table. Treat it as an empty table.
952*/
953static int ktablelen (lua_State *L, int idx) {
954 if (!lua_istable(L, idx)) return 0;
955 else return lua_objlen(L, idx);
956}
957
958
959/*

Callers 2

jointableFunction · 0.85
printpat_lFunction · 0.85

Calls 1

lua_objlenFunction · 0.70

Tested by

no test coverage detected