| 163 | |
| 164 | |
| 165 | LUALIB_API const char *luaL_optlstring (lua_State *L, int narg, |
| 166 | const char *def, size_t *len) { |
| 167 | if (lua_isnoneornil(L, narg)) { |
| 168 | if (len) |
| 169 | *len = (def ? strlen(def) : 0); |
| 170 | return def; |
| 171 | } |
| 172 | else return luaL_checklstring(L, narg, len); |
| 173 | } |
| 174 | |
| 175 | |
| 176 | LUALIB_API lua_Number luaL_checknumber (lua_State *L, int narg) { |
no test coverage detected