diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-30 14:19:48 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-30 14:19:48 -0300 |
commit | 556a89e53751135f45d8dd1e84651461b67e1f81 (patch) | |
tree | 85c4d8486d53e534100c4b8c9ab30c6990585496 /ldebug.c | |
parent | e2c60eda16d4aff7ea42513ba7c4d33ac45d9e99 (diff) | |
download | lua-556a89e53751135f45d8dd1e84651461b67e1f81.tar.gz lua-556a89e53751135f45d8dd1e84651461b67e1f81.tar.bz2 lua-556a89e53751135f45d8dd1e84651461b67e1f81.zip |
new names for debug types
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -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 | ||
44 | lua_Dbghook lua_setcallhook (lua_State *L, lua_Dbghook func) { | 44 | lua_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 | ||
51 | lua_Dbghook lua_setlinehook (lua_State *L, lua_Dbghook func) { | 51 | lua_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 | ||
78 | int lua_getstack (lua_State *L, int level, lua_Dbgactreg *ar) { | 78 | int 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 | ||
109 | int lua_getlocal (lua_State *L, const lua_Dbgactreg *ar, lua_Dbglocvar *v) { | 109 | int 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 | ||
123 | int lua_setlocal (lua_State *L, const lua_Dbgactreg *ar, lua_Dbglocvar *v) { | 123 | int 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 | ||
135 | static void lua_funcinfo (lua_Dbgactreg *ar) { | 135 | static 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 | ||
161 | static void lua_getobjname (lua_State *L, StkId f, lua_Dbgactreg *ar) { | 161 | static 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 | ||
179 | int lua_getinfo (lua_State *L, const char *what, lua_Dbgactreg *ar) { | 179 | int 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++) { |