| 200 | |
| 201 | |
| 202 | LUALIB_API const char *luaL_optlstring (lua_State *L, int narg, |
| 203 | const char *def, size_t *len) { |
| 204 | if (lua_isnoneornil(L, narg)) { |
| 205 | if (len) |
| 206 | *len = (def ? strlen(def) : 0); |
| 207 | return def; |
| 208 | } |
| 209 | else return luaL_checklstring(L, narg, len); |
| 210 | } |
| 211 | |
| 212 | |
| 213 | LUALIB_API lua_Number luaL_checknumber (lua_State *L, int narg) { |
no test coverage detected