** 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. */
| 951 | ** a table. Treat it as an empty table. |
| 952 | */ |
| 953 | static 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 | /* |
no test coverage detected