summaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ldebug.c b/ldebug.c
index 86ee7dae..6e4cdb35 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.112 2015/03/06 19:49:50 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.113 2015/03/11 16:10:41 roberto Exp roberto $
3** Debug Interface 3** Debug Interface
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -126,7 +126,7 @@ static const char *upvalname (Proto *p, int uv) {
126 126
127static const char *findvararg (CallInfo *ci, int n, StkId *pos) { 127static const char *findvararg (CallInfo *ci, int n, StkId *pos) {
128 int nparams = clLvalue(ci->func)->p->numparams; 128 int nparams = clLvalue(ci->func)->p->numparams;
129 if (n >= ci->u.l.base - ci->func - nparams) 129 if (n >= cast_int(ci->u.l.base - ci->func) - nparams)
130 return NULL; /* no such vararg */ 130 return NULL; /* no such vararg */
131 else { 131 else {
132 *pos = ci->func + nparams + n; 132 *pos = ci->func + nparams + n;
@@ -172,7 +172,7 @@ LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n) {
172 name = luaF_getlocalname(clLvalue(L->top - 1)->p, n, 0); 172 name = luaF_getlocalname(clLvalue(L->top - 1)->p, n, 0);
173 } 173 }
174 else { /* active function; get information through 'ar' */ 174 else { /* active function; get information through 'ar' */
175 StkId pos = 0; /* to avoid warnings */ 175 StkId pos = NULL; /* to avoid warnings */
176 name = findlocal(L, ar->i_ci, n, &pos); 176 name = findlocal(L, ar->i_ci, n, &pos);
177 if (name) { 177 if (name) {
178 setobj2s(L, L->top, pos); 178 setobj2s(L, L->top, pos);
@@ -186,7 +186,7 @@ LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n) {
186 186
187 187
188LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) { 188LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) {
189 StkId pos = 0; /* to avoid warnings */ 189 StkId pos = NULL; /* to avoid warnings */
190 const char *name; 190 const char *name;
191 lua_lock(L); 191 lua_lock(L);
192 swapextra(L); 192 swapextra(L);