| 428 | |
| 429 | |
| 430 | LUA_API lua_Unsigned lua_rawlen (lua_State *L, int idx) { |
| 431 | const TValue *o = index2value(L, idx); |
| 432 | switch (ttypetag(o)) { |
| 433 | case LUA_VSHRSTR: return tsvalue(o)->shrlen; |
| 434 | case LUA_VLNGSTR: return tsvalue(o)->u.lnglen; |
| 435 | case LUA_VUSERDATA: return uvalue(o)->len; |
| 436 | case LUA_VTABLE: return luaH_getn(hvalue(o)); |
| 437 | default: return 0; |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | |
| 442 | LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) { |
nothing calls this directly
no test coverage detected