aboutsummaryrefslogtreecommitdiff
path: root/ldblib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldblib.c')
-rw-r--r--ldblib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ldblib.c b/ldblib.c
index ad6a448a..ba7237c2 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldblib.c,v 1.80 2003/04/03 13:35:34 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.81 2003/07/07 13:37:08 roberto Exp roberto $
3** Interface from Lua to its debug API 3** Interface from Lua to its debug API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -27,7 +27,7 @@ static void settabss (lua_State *L, const char *i, const char *v) {
27 27
28static void settabsi (lua_State *L, const char *i, int v) { 28static void settabsi (lua_State *L, const char *i, int v) {
29 lua_pushstring(L, i); 29 lua_pushstring(L, i);
30 lua_pushnumber(L, (lua_Number)v); 30 lua_pushinteger(L, v);
31 lua_rawset(L, -3); 31 lua_rawset(L, -3);
32} 32}
33 33
@@ -50,7 +50,7 @@ static int getinfo (lua_State *L) {
50 lua_State *L1 = getthread(L, &arg); 50 lua_State *L1 = getthread(L, &arg);
51 const char *options = luaL_optstring(L, arg+2, "flnSu"); 51 const char *options = luaL_optstring(L, arg+2, "flnSu");
52 if (lua_isnumber(L, arg+1)) { 52 if (lua_isnumber(L, arg+1)) {
53 if (!lua_getstack(L1, (int)(lua_tonumber(L, arg+1)), &ar)) { 53 if (!lua_getstack(L1, (int)lua_tointeger(L, arg+1), &ar)) {
54 lua_pushnil(L); /* level out of range */ 54 lua_pushnil(L); /* level out of range */
55 return 1; 55 return 1;
56 } 56 }
@@ -171,7 +171,7 @@ static void hookf (lua_State *L, lua_Debug *ar) {
171 if (lua_isfunction(L, -1)) { 171 if (lua_isfunction(L, -1)) {
172 lua_pushstring(L, hooknames[(int)ar->event]); 172 lua_pushstring(L, hooknames[(int)ar->event]);
173 if (ar->currentline >= 0) 173 if (ar->currentline >= 0)
174 lua_pushnumber(L, (lua_Number)ar->currentline); 174 lua_pushinteger(L, ar->currentline);
175 else lua_pushnil(L); 175 else lua_pushnil(L);
176 lua_assert(lua_getinfo(L, "lS", ar)); 176 lua_assert(lua_getinfo(L, "lS", ar));
177 lua_call(L, 2, 0); 177 lua_call(L, 2, 0);
@@ -251,7 +251,7 @@ static int gethook (lua_State *L) {
251 lua_xmove(L1, L, 1); 251 lua_xmove(L1, L, 1);
252 } 252 }
253 lua_pushstring(L, unmakemask(mask, buff)); 253 lua_pushstring(L, unmakemask(mask, buff));
254 lua_pushnumber(L, (lua_Number)lua_gethookcount(L1)); 254 lua_pushinteger(L, lua_gethookcount(L1));
255 return 3; 255 return 3;
256} 256}
257 257