diff options
Diffstat (limited to '')
| -rw-r--r-- | lauxlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -81,7 +81,7 @@ LUALIB_API const char *luaL_check_lstr (lua_State *L, int narg, size_t *len) { | |||
| 81 | 81 | ||
| 82 | 82 | ||
| 83 | LUALIB_API const char *luaL_opt_lstr (lua_State *L, int narg, const char *def, size_t *len) { | 83 | LUALIB_API const char *luaL_opt_lstr (lua_State *L, int narg, const char *def, size_t *len) { |
| 84 | if (lua_isnull(L, narg)) { | 84 | if (lua_isnone(L, narg)) { |
| 85 | if (len) | 85 | if (len) |
| 86 | *len = (def ? strlen(def) : 0); | 86 | *len = (def ? strlen(def) : 0); |
| 87 | return def; | 87 | return def; |
| @@ -99,7 +99,7 @@ LUALIB_API lua_Number luaL_check_number (lua_State *L, int narg) { | |||
| 99 | 99 | ||
| 100 | 100 | ||
| 101 | LUALIB_API lua_Number luaL_opt_number (lua_State *L, int narg, lua_Number def) { | 101 | LUALIB_API lua_Number luaL_opt_number (lua_State *L, int narg, lua_Number def) { |
| 102 | if (lua_isnull(L, narg)) return def; | 102 | if (lua_isnone(L, narg)) return def; |
| 103 | else return luaL_check_number(L, narg); | 103 | else return luaL_check_number(L, narg); |
| 104 | } | 104 | } |
| 105 | 105 | ||
