diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-01-29 14:21:35 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-01-29 14:21:35 -0200 |
commit | dc0ab1e8ca38400d5d7b3a7d00ff7f6c33fdf3d3 (patch) | |
tree | 6a595627f188d1895d7c49c96bf99e5f6031f258 | |
parent | e2b15aa21d2f31ccc93e35f50928e26a8d9c84ce (diff) | |
download | lua-dc0ab1e8ca38400d5d7b3a7d00ff7f6c33fdf3d3.tar.gz lua-dc0ab1e8ca38400d5d7b3a7d00ff7f6c33fdf3d3.tar.bz2 lua-dc0ab1e8ca38400d5d7b3a7d00ff7f6c33fdf3d3.zip |
warnings in VS (implicit casts from ptrdiff_t to int)
-rw-r--r-- | lapi.c | 4 | ||||
-rw-r--r-- | ldo.c | 4 | ||||
-rw-r--r-- | lvm.c | 4 |
3 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.280 2018/01/10 12:02:35 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.281 2018/01/28 15:13:26 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -993,7 +993,7 @@ LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, | |||
993 | ci->u.c.k = k; /* save continuation */ | 993 | ci->u.c.k = k; /* save continuation */ |
994 | ci->u.c.ctx = ctx; /* save context */ | 994 | ci->u.c.ctx = ctx; /* save context */ |
995 | /* save information for error recovery */ | 995 | /* save information for error recovery */ |
996 | ci->u2.funcidx = savestack(L, c.func); | 996 | ci->u2.funcidx = cast_int(savestack(L, c.func)); |
997 | ci->u.c.old_errfunc = L->errfunc; | 997 | ci->u.c.old_errfunc = L->errfunc; |
998 | L->errfunc = func; | 998 | L->errfunc = func; |
999 | setoah(ci->callstatus, L->allowhook); /* save value of 'allowhook' */ | 999 | setoah(ci->callstatus, L->allowhook); /* save value of 'allowhook' */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.187 2018/01/28 12:08:04 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.188 2018/01/28 13:39:52 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -673,7 +673,7 @@ LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs, | |||
673 | else lua_assert(status == L->status); /* normal end or yield */ | 673 | else lua_assert(status == L->status); /* normal end or yield */ |
674 | } | 674 | } |
675 | *nresults = (status == LUA_YIELD) ? L->ci->u2.nyield | 675 | *nresults = (status == LUA_YIELD) ? L->ci->u2.nyield |
676 | : L->top - (L->ci->func + 1); | 676 | : cast_int(L->top - (L->ci->func + 1)); |
677 | L->nny = oldnny; /* restore 'nny' */ | 677 | L->nny = oldnny; /* restore 'nny' */ |
678 | L->nCcalls--; | 678 | L->nCcalls--; |
679 | // lua_assert(L->nCcalls == ((from) ? from->nCcalls : 0)); | 679 | // lua_assert(L->nCcalls == ((from) ? from->nCcalls : 0)); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.334 2018/01/14 17:27:50 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.335 2018/01/27 16:56:33 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -1488,7 +1488,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
1488 | if (b != 0) | 1488 | if (b != 0) |
1489 | L->top = ra + b; | 1489 | L->top = ra + b; |
1490 | else /* previous instruction set top */ | 1490 | else /* previous instruction set top */ |
1491 | b = L->top - ra; | 1491 | b = cast_int(L->top - ra); |
1492 | lua_assert(GETARG_C(i) - 1 == LUA_MULTRET); | 1492 | lua_assert(GETARG_C(i) - 1 == LUA_MULTRET); |
1493 | if (!ttisfunction(vra)) { /* not a function? */ | 1493 | if (!ttisfunction(vra)) { /* not a function? */ |
1494 | ProtectNT(luaD_tryfuncTM(L, ra)); /* try '__call' metamethod */ | 1494 | ProtectNT(luaD_tryfuncTM(L, ra)); /* try '__call' metamethod */ |