| 395 | |
| 396 | |
| 397 | LUA_API lua_Unsigned lua_rawlen (lua_State *L, int idx) { |
| 398 | const TValue *o = index2value(L, idx); |
| 399 | switch (ttypetag(o)) { |
| 400 | case LUA_VSHRSTR: return tsvalue(o)->shrlen; |
| 401 | case LUA_VLNGSTR: return tsvalue(o)->u.lnglen; |
| 402 | case LUA_VUSERDATA: return uvalue(o)->len; |
| 403 | case LUA_VTABLE: return luaH_getn(hvalue(o)); |
| 404 | default: return 0; |
| 405 | } |
| 406 | } |
| 407 | |
| 408 | |
| 409 | LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) { |
nothing calls this directly
no test coverage detected