diff options
Diffstat (limited to '')
| -rw-r--r-- | lstrlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstrlib.c,v 1.71 2001/08/31 19:46:07 roberto Exp $ | 2 | ** $Id: lstrlib.c,v 1.72 2001/10/16 17:41:43 roberto Exp $ |
| 3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -92,7 +92,7 @@ static int str_concat (lua_State *L) { | |||
| 92 | size_t lsep; | 92 | size_t lsep; |
| 93 | const char *sep = luaL_opt_lstr(L, 2, "", &lsep); | 93 | const char *sep = luaL_opt_lstr(L, 2, "", &lsep); |
| 94 | int n, i; | 94 | int n, i; |
| 95 | luaL_checktype(L, 1, LUA_TTABLE); | 95 | luaL_check_rawtype(L, 1, LUA_TTABLE); |
| 96 | luaL_buffinit(L, &b); | 96 | luaL_buffinit(L, &b); |
| 97 | n = lua_getn(L, 1); | 97 | n = lua_getn(L, 1); |
| 98 | for (i=1; i<=n; i++) { | 98 | for (i=1; i<=n; i++) { |
| @@ -431,7 +431,7 @@ static void push_onecapture (MatchState *ms, int i) { | |||
| 431 | 431 | ||
| 432 | static int push_captures (MatchState *ms) { | 432 | static int push_captures (MatchState *ms) { |
| 433 | int i; | 433 | int i; |
| 434 | luaL_checkstack(ms->L, ms->level, l_s("too many captures")); | 434 | luaL_check_stack(ms->L, ms->level, l_s("too many captures")); |
| 435 | for (i=0; i<ms->level; i++) | 435 | for (i=0; i<ms->level; i++) |
| 436 | push_onecapture(ms, i); | 436 | push_onecapture(ms, i); |
| 437 | return ms->level; /* number of strings pushed */ | 437 | return ms->level; /* number of strings pushed */ |
