aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-30 14:19:48 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-30 14:19:48 -0300
commit556a89e53751135f45d8dd1e84651461b67e1f81 (patch)
tree85c4d8486d53e534100c4b8c9ab30c6990585496 /ldebug.c
parente2c60eda16d4aff7ea42513ba7c4d33ac45d9e99 (diff)
downloadlua-556a89e53751135f45d8dd1e84651461b67e1f81.tar.gz
lua-556a89e53751135f45d8dd1e84651461b67e1f81.tar.bz2
lua-556a89e53751135f45d8dd1e84651461b67e1f81.zip
new names for debug types
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ldebug.c b/ldebug.c
index 40bcb6e6..c392820c 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 1.13 2000/03/27 20:10:21 roberto Exp roberto $ 2** $Id: ldebug.c,v 1.14 2000/03/29 20:19:20 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*/
@@ -41,15 +41,15 @@ static int hasdebuginfo (lua_State *L, StkId f) {
41} 41}
42 42
43 43
44lua_Dbghook lua_setcallhook (lua_State *L, lua_Dbghook func) { 44lua_Hook lua_setcallhook (lua_State *L, lua_Hook func) {
45 lua_Dbghook oldhook = L->callhook; 45 lua_Hook oldhook = L->callhook;
46 L->callhook = func; 46 L->callhook = func;
47 return oldhook; 47 return oldhook;
48} 48}
49 49
50 50
51lua_Dbghook lua_setlinehook (lua_State *L, lua_Dbghook func) { 51lua_Hook lua_setlinehook (lua_State *L, lua_Hook func) {
52 lua_Dbghook oldhook = L->linehook; 52 lua_Hook oldhook = L->linehook;
53 L->linehook = func; 53 L->linehook = func;
54 return oldhook; 54 return oldhook;
55} 55}
@@ -75,7 +75,7 @@ static StkId aux_stackedfunction (lua_State *L, int level, StkId top) {
75} 75}
76 76
77 77
78int lua_getstack (lua_State *L, int level, lua_Dbgactreg *ar) { 78int lua_getstack (lua_State *L, int level, lua_Debug *ar) {
79 StkId f = aux_stackedfunction(L, level, L->top); 79 StkId f = aux_stackedfunction(L, level, L->top);
80 if (f == NULL) return 0; /* there is no such level */ 80 if (f == NULL) return 0; /* there is no such level */
81 else { 81 else {
@@ -106,7 +106,7 @@ static Proto *getluaproto (StkId f) {
106} 106}
107 107
108 108
109int lua_getlocal (lua_State *L, const lua_Dbgactreg *ar, lua_Dbglocvar *v) { 109int lua_getlocal (lua_State *L, const lua_Debug *ar, lua_Localvar *v) {
110 StkId f = ar->_func; 110 StkId f = ar->_func;
111 Proto *fp = getluaproto(f); 111 Proto *fp = getluaproto(f);
112 if (!fp) return 0; /* `f' is not a Lua function? */ 112 if (!fp) return 0; /* `f' is not a Lua function? */
@@ -120,7 +120,7 @@ int lua_getlocal (lua_State *L, const lua_Dbgactreg *ar, lua_Dbglocvar *v) {
120} 120}
121 121
122 122
123int lua_setlocal (lua_State *L, const lua_Dbgactreg *ar, lua_Dbglocvar *v) { 123int lua_setlocal (lua_State *L, const lua_Debug *ar, lua_Localvar *v) {
124 StkId f = ar->_func; 124 StkId f = ar->_func;
125 Proto *fp = getluaproto(f); 125 Proto *fp = getluaproto(f);
126 if (!fp) return 0; /* `f' is not a Lua function? */ 126 if (!fp) return 0; /* `f' is not a Lua function? */
@@ -132,7 +132,7 @@ int lua_setlocal (lua_State *L, const lua_Dbgactreg *ar, lua_Dbglocvar *v) {
132} 132}
133 133
134 134
135static void lua_funcinfo (lua_Dbgactreg *ar) { 135static void lua_funcinfo (lua_Debug *ar) {
136 StkId func = ar->_func; 136 StkId func = ar->_func;
137 switch (ttype(func)) { 137 switch (ttype(func)) {
138 case TAG_LCLOSURE: case TAG_LCLMARK: 138 case TAG_LCLOSURE: case TAG_LCLMARK:
@@ -158,7 +158,7 @@ static int checkfunc (lua_State *L, TObject *o) {
158} 158}
159 159
160 160
161static void lua_getobjname (lua_State *L, StkId f, lua_Dbgactreg *ar) { 161static void lua_getobjname (lua_State *L, StkId f, lua_Debug *ar) {
162 GlobalVar *g; 162 GlobalVar *g;
163 /* try to find a name for given function */ 163 /* try to find a name for given function */
164 setnormalized(L->top, f); /* to be used by `checkfunc' */ 164 setnormalized(L->top, f); /* to be used by `checkfunc' */
@@ -176,7 +176,7 @@ static void lua_getobjname (lua_State *L, StkId f, lua_Dbgactreg *ar) {
176} 176}
177 177
178 178
179int lua_getinfo (lua_State *L, const char *what, lua_Dbgactreg *ar) { 179int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) {
180 StkId func = ar->_func; 180 StkId func = ar->_func;
181 LUA_ASSERT(L, is_T_MARK(ttype(func)), "invalid activation record"); 181 LUA_ASSERT(L, is_T_MARK(ttype(func)), "invalid activation record");
182 for (; *what; what++) { 182 for (; *what; what++) {