| 2248 | |
| 2249 | |
| 2250 | LUA_API const void *lua_topointer (lua_State *L, int idx) { |
| 2251 | StkId o = index2adr(L, idx); |
| 2252 | switch (ttype(o)) { |
| 2253 | case LUA_TTABLE: return hvalue(o); |
| 2254 | case LUA_TFUNCTION: return clvalue(o); |
| 2255 | case LUA_TTHREAD: return thvalue(o); |
| 2256 | case LUA_TUSERDATA: |
| 2257 | case LUA_TLIGHTUSERDATA: |
| 2258 | return lua_touserdata(L, idx); |
| 2259 | default: return NULL; |
| 2260 | } |
| 2261 | } |
| 2262 | |
| 2263 | |
| 2264 |
no test coverage detected