| 338 | } |
| 339 | |
| 340 | int Script::LenCollection(lua_State* pState) { |
| 341 | // 1 table |
| 342 | if(lua_getmetatable(pState, 1)) { |
| 343 | lua_getfield(pState, -1, "|count"); |
| 344 | if (lua_isnumber(pState, -1)) { |
| 345 | lua_replace(pState, -2); |
| 346 | return 1; |
| 347 | } |
| 348 | lua_pop(pState, 2); |
| 349 | } |
| 350 | lua_pushnumber(pState,lua_objlen(pState, 1)); |
| 351 | return 1; |
| 352 | } |
| 353 | |
| 354 | int Script::CollectionToString(lua_State* pState) { |
| 355 | // 1 - table |
nothing calls this directly
no outgoing calls
no test coverage detected