summaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lstrlib.c b/lstrlib.c
index 83cc45be..963469b9 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -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
463static void push_onecapture (MatchState *ms, int i) { 463static 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));