| 226 | |
| 227 | |
| 228 | LUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int narg) { |
| 229 | lua_Integer d = lua_tointeger(L, narg); |
| 230 | if (d == 0 && !lua_isnumber(L, narg)) /* avoid extra test when d is not 0 */ |
| 231 | /* COMDB2 MODIFICATION */ |
| 232 | { |
| 233 | if (luabb_isnumber(L, narg) && !luabb_isnull(L, narg)) { |
| 234 | long long i; |
| 235 | luabb_tointeger(L, narg, &i); |
| 236 | d = i; |
| 237 | } else |
| 238 | /* COMDB2 MODIFICATION */ |
| 239 | tag_error(L, narg, LUA_TNUMBER); |
| 240 | } |
| 241 | return d; |
| 242 | } |
| 243 | |
| 244 | |
| 245 | LUALIB_API lua_Integer luaL_optinteger (lua_State *L, int narg, |
no test coverage detected