diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-31 11:25:18 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-31 11:25:18 -0300 |
| commit | 90de38bf1f85714526c30e42b670ca997ec45827 (patch) | |
| tree | c9dbf61d741ddd2ededcba4c1a4da99211c28f7a /lstrlib.c | |
| parent | e8a7ecb982effdfc1148098b288c6ac7130f756e (diff) | |
| download | lua-90de38bf1f85714526c30e42b670ca997ec45827.tar.gz lua-90de38bf1f85714526c30e42b670ca997ec45827.tar.bz2 lua-90de38bf1f85714526c30e42b670ca997ec45827.zip | |
warnings in VS .Net
Diffstat (limited to 'lstrlib.c')
| -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.115 2005/05/17 19:49:15 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.116 2005/05/20 15:53:42 roberto Exp roberto $ |
| 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 | */ |
| @@ -461,7 +461,7 @@ static const char *lmemfind (const char *s1, size_t l1, | |||
| 461 | 461 | ||
| 462 | 462 | ||
| 463 | static void push_onecapture (MatchState *ms, int i) { | 463 | static void push_onecapture (MatchState *ms, int i) { |
| 464 | int l = ms->capture[i].len; | 464 | ptrdiff_t l = ms->capture[i].len; |
| 465 | if (l == CAP_UNFINISHED) luaL_error(ms->L, "unfinished capture"); | 465 | if (l == CAP_UNFINISHED) luaL_error(ms->L, "unfinished capture"); |
| 466 | if (l == CAP_POSITION) | 466 | if (l == CAP_POSITION) |
| 467 | lua_pushinteger(ms->L, ms->capture[i].init - ms->src_init + 1); | 467 | lua_pushinteger(ms->L, ms->capture[i].init - ms->src_init + 1); |
| @@ -539,7 +539,7 @@ static int gfind_aux (lua_State *L) { | |||
| 539 | const char *e; | 539 | const char *e; |
| 540 | ms.level = 0; | 540 | ms.level = 0; |
| 541 | if ((e = match(&ms, src, p)) != NULL) { | 541 | if ((e = match(&ms, src, p)) != NULL) { |
| 542 | int newstart = e-s; | 542 | lua_Integer newstart = e-s; |
| 543 | if (e == src) newstart++; /* empty match? go at least one position */ | 543 | if (e == src) newstart++; /* empty match? go at least one position */ |
| 544 | lua_pushinteger(L, newstart); | 544 | lua_pushinteger(L, newstart); |
| 545 | lua_replace(L, lua_upvalueindex(3)); | 545 | lua_replace(L, lua_upvalueindex(3)); |
