diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-26 09:45:51 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-26 09:45:51 -0200 |
commit | bce6572579a7e6c7a96895d9280396b3b33b8f3f (patch) | |
tree | a937d0366ae9d9e37e6320b347ec463f337ceb1b /ldebug.c | |
parent | a53d9b66ca6247818acaf41e28cdf123082a272b (diff) | |
download | lua-bce6572579a7e6c7a96895d9280396b3b33b8f3f.tar.gz lua-bce6572579a7e6c7a96895d9280396b3b33b8f3f.tar.bz2 lua-bce6572579a7e6c7a96895d9280396b3b33b8f3f.zip |
new macros + new names to facilitate compilation of threaded version
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 1.55 2001/01/24 15:45:33 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.56 2001/01/25 16:45:36 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 | */ |
@@ -42,20 +42,20 @@ static int isLmark (StkId o) { | |||
42 | 42 | ||
43 | LUA_API lua_Hook lua_setcallhook (lua_State *L, lua_Hook func) { | 43 | LUA_API lua_Hook lua_setcallhook (lua_State *L, lua_Hook func) { |
44 | lua_Hook oldhook; | 44 | lua_Hook oldhook; |
45 | LUA_ENTRY; | 45 | LUA_LOCK; |
46 | oldhook = L->callhook; | 46 | oldhook = L->callhook; |
47 | L->callhook = func; | 47 | L->callhook = func; |
48 | LUA_EXIT; | 48 | LUA_UNLOCK; |
49 | return oldhook; | 49 | return oldhook; |
50 | } | 50 | } |
51 | 51 | ||
52 | 52 | ||
53 | LUA_API lua_Hook lua_setlinehook (lua_State *L, lua_Hook func) { | 53 | LUA_API lua_Hook lua_setlinehook (lua_State *L, lua_Hook func) { |
54 | lua_Hook oldhook; | 54 | lua_Hook oldhook; |
55 | LUA_ENTRY; | 55 | LUA_LOCK; |
56 | oldhook = L->linehook; | 56 | oldhook = L->linehook; |
57 | L->linehook = func; | 57 | L->linehook = func; |
58 | LUA_EXIT; | 58 | LUA_UNLOCK; |
59 | return oldhook; | 59 | return oldhook; |
60 | } | 60 | } |
61 | 61 | ||
@@ -76,14 +76,14 @@ static StkId aux_stackedfunction (lua_State *L, int level, StkId top) { | |||
76 | LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) { | 76 | LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) { |
77 | StkId f; | 77 | StkId f; |
78 | int status; | 78 | int status; |
79 | LUA_ENTRY; | 79 | LUA_LOCK; |
80 | f = aux_stackedfunction(L, level, L->top); | 80 | f = aux_stackedfunction(L, level, L->top); |
81 | if (f == NULL) status = 0; /* there is no such level */ | 81 | if (f == NULL) status = 0; /* there is no such level */ |
82 | else { | 82 | else { |
83 | ar->_func = f; | 83 | ar->_func = f; |
84 | status = 1; | 84 | status = 1; |
85 | } | 85 | } |
86 | LUA_EXIT; | 86 | LUA_UNLOCK; |
87 | return status; | 87 | return status; |
88 | } | 88 | } |
89 | 89 | ||
@@ -162,7 +162,7 @@ LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n) { | |||
162 | const char *name; | 162 | const char *name; |
163 | StkId f; | 163 | StkId f; |
164 | Proto *fp; | 164 | Proto *fp; |
165 | LUA_ENTRY; | 165 | LUA_LOCK; |
166 | name = NULL; | 166 | name = NULL; |
167 | f = ar->_func; | 167 | f = ar->_func; |
168 | fp = getluaproto(f); | 168 | fp = getluaproto(f); |
@@ -171,7 +171,7 @@ LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n) { | |||
171 | if (name) | 171 | if (name) |
172 | luaA_pushobject(L, (f+1)+(n-1)); /* push value */ | 172 | luaA_pushobject(L, (f+1)+(n-1)); /* push value */ |
173 | } | 173 | } |
174 | LUA_EXIT; | 174 | LUA_UNLOCK; |
175 | return name; | 175 | return name; |
176 | } | 176 | } |
177 | 177 | ||
@@ -180,7 +180,7 @@ LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) { | |||
180 | const char *name; | 180 | const char *name; |
181 | StkId f; | 181 | StkId f; |
182 | Proto *fp; | 182 | Proto *fp; |
183 | LUA_ENTRY; | 183 | LUA_LOCK; |
184 | name = NULL; | 184 | name = NULL; |
185 | f = ar->_func; | 185 | f = ar->_func; |
186 | fp = getluaproto(f); | 186 | fp = getluaproto(f); |
@@ -192,7 +192,7 @@ LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) { | |||
192 | else | 192 | else |
193 | setobj((f+1)+(n-1), L->top); | 193 | setobj((f+1)+(n-1), L->top); |
194 | } | 194 | } |
195 | LUA_EXIT; | 195 | LUA_UNLOCK; |
196 | return name; | 196 | return name; |
197 | } | 197 | } |
198 | 198 | ||
@@ -272,7 +272,7 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) { | |||
272 | StkId func; | 272 | StkId func; |
273 | int isactive; | 273 | int isactive; |
274 | int status = 1; | 274 | int status = 1; |
275 | LUA_ENTRY; | 275 | LUA_LOCK; |
276 | isactive = (*what != '>'); | 276 | isactive = (*what != '>'); |
277 | if (isactive) | 277 | if (isactive) |
278 | func = ar->_func; | 278 | func = ar->_func; |
@@ -309,7 +309,7 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) { | |||
309 | } | 309 | } |
310 | } | 310 | } |
311 | if (!isactive) L->top--; /* pop function */ | 311 | if (!isactive) L->top--; /* pop function */ |
312 | LUA_EXIT; | 312 | LUA_UNLOCK; |
313 | return status; | 313 | return status; |
314 | } | 314 | } |
315 | 315 | ||