| 232 | |
| 233 | |
| 234 | static int math_type (lua_State *L) { |
| 235 | if (lua_type(L, 1) == LUA_TNUMBER) |
| 236 | lua_pushstring(L, (lua_isinteger(L, 1)) ? "integer" : "float"); |
| 237 | else { |
| 238 | luaL_checkany(L, 1); |
| 239 | luaL_pushfail(L); |
| 240 | } |
| 241 | return 1; |
| 242 | } |
| 243 | |
| 244 | |
| 245 |
nothing calls this directly
no test coverage detected