aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ldebug.c b/ldebug.c
index 09e04988..8cc7bbb3 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.19 2005/05/16 21:19:00 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.20 2005/05/17 19:49:15 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*/
@@ -92,7 +92,7 @@ LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) {
92 } 92 }
93 if (level == 0 && ci > L->base_ci) { /* level found? */ 93 if (level == 0 && ci > L->base_ci) { /* level found? */
94 status = 1; 94 status = 1;
95 ar->i_ci = ci - L->base_ci; 95 ar->i_ci = cast(int, ci - L->base_ci);
96 } 96 }
97 else if (level < 0) { /* level is of a lost tail call? */ 97 else if (level < 0) { /* level is of a lost tail call? */
98 status = 1; 98 status = 1;
@@ -546,7 +546,8 @@ void luaG_typeerror (lua_State *L, const TValue *o, const char *op) {
546 const char *name = NULL; 546 const char *name = NULL;
547 const char *t = luaT_typenames[ttype(o)]; 547 const char *t = luaT_typenames[ttype(o)];
548 const char *kind = (isinstack(L->ci, o)) ? 548 const char *kind = (isinstack(L->ci, o)) ?
549 getobjname(L, L->ci, o - L->base, &name) : NULL; 549 getobjname(L, L->ci, cast(int, o - L->base), &name) :
550 NULL;
550 if (kind) 551 if (kind)
551 luaG_runerror(L, "attempt to %s %s " LUA_QS " (a %s value)", 552 luaG_runerror(L, "attempt to %s %s " LUA_QS " (a %s value)",
552 op, kind, name, t); 553 op, kind, name, t);