aboutsummaryrefslogtreecommitdiff
path: root/ldblib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-03-12 17:57:40 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-03-12 17:57:40 -0300
commita3addae03634794b841b6c8c4dd8ff83542d8896 (patch)
tree66695864f7bd56c295ad7cd6a6465845103cd424 /ldblib.c
parentad40bb1181d08821af6789147a28aa8370533d11 (diff)
downloadlua-a3addae03634794b841b6c8c4dd8ff83542d8896.tar.gz
lua-a3addae03634794b841b6c8c4dd8ff83542d8896.tar.bz2
lua-a3addae03634794b841b6c8c4dd8ff83542d8896.zip
lua_gettable and similars return type of gotten value
Diffstat (limited to 'ldblib.c')
-rw-r--r--ldblib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ldblib.c b/ldblib.c
index 10328f3a..09e1c252 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldblib.c,v 1.135 2013/07/22 16:05:53 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.136 2014/02/19 13:51:09 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*/
@@ -270,8 +270,7 @@ static void hookf (lua_State *L, lua_Debug *ar) {
270 {"call", "return", "line", "count", "tail call"}; 270 {"call", "return", "line", "count", "tail call"};
271 gethooktable(L); 271 gethooktable(L);
272 lua_pushthread(L); 272 lua_pushthread(L);
273 lua_rawget(L, -2); 273 if (lua_rawget(L, -2) == LUA_TFUNCTION) {
274 if (lua_isfunction(L, -1)) {
275 lua_pushstring(L, hooknames[(int)ar->event]); 274 lua_pushstring(L, hooknames[(int)ar->event]);
276 if (ar->currentline >= 0) 275 if (ar->currentline >= 0)
277 lua_pushinteger(L, ar->currentline); 276 lua_pushinteger(L, ar->currentline);