summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-03-11 13:10:41 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-03-11 13:10:41 -0300
commit0cf3b6495a9eb58b7e50f43d633414aabab199af (patch)
tree2ecc23433f5bbd817db7719c3b6bb76965802c1c
parentb66fedadaef9b6adcdc531d96eb0c4e54a600f6b (diff)
downloadlua-0cf3b6495a9eb58b7e50f43d633414aabab199af.tar.gz
lua-0cf3b6495a9eb58b7e50f43d633414aabab199af.tar.bz2
lua-0cf3b6495a9eb58b7e50f43d633414aabab199af.zip
'ci_func' don't need to be exported
-rw-r--r--ldebug.c6
-rw-r--r--ldebug.h5
-rw-r--r--ltests.c4
3 files changed, 8 insertions, 7 deletions
diff --git a/ldebug.c b/ldebug.c
index b51ae8b7..86ee7dae 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.111 2015/02/13 16:01:17 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.112 2015/03/06 19:49:50 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*/
@@ -34,6 +34,10 @@
34#define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_TCCL) 34#define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_TCCL)
35 35
36 36
37/* Active Lua function (given call info) */
38#define ci_func(ci) (clLvalue((ci)->func))
39
40
37static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name); 41static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name);
38 42
39 43
diff --git a/ldebug.h b/ldebug.h
index 7fba153c..e44b3f78 100644
--- a/ldebug.h
+++ b/ldebug.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.h,v 2.11 2014/02/25 14:31:16 roberto Exp roberto $ 2** $Id: ldebug.h,v 2.12 2014/11/10 14:46:05 roberto Exp roberto $
3** Auxiliary functions from Debug Interface module 3** Auxiliary functions from Debug Interface module
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -17,9 +17,6 @@
17 17
18#define resethookcount(L) (L->hookcount = L->basehookcount) 18#define resethookcount(L) (L->hookcount = L->basehookcount)
19 19
20/* Active Lua function (given call info) */
21#define ci_func(ci) (clLvalue((ci)->func))
22
23 20
24LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, 21LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
25 const char *opname); 22 const char *opname);
diff --git a/ltests.c b/ltests.c
index dadcad8d..858df9dd 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.201 2014/12/18 12:13:42 roberto Exp roberto $ 2** $Id: ltests.c,v 2.202 2015/01/16 16:54:37 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -291,7 +291,7 @@ static int lua_checkpc (lua_State *L, CallInfo *ci) {
291 else { 291 else {
292 Proto *p; 292 Proto *p;
293 if (L->status != LUA_YIELD || ci != L->ci) 293 if (L->status != LUA_YIELD || ci != L->ci)
294 p = ci_func(ci)->p; 294 p = clLvalue(ci->func)->p;
295 else /* real 'func' was saved in 'extra' field */ 295 else /* real 'func' was saved in 'extra' field */
296 p = clLvalue(restorestack(L, ci->extra))->p; 296 p = clLvalue(restorestack(L, ci->extra))->p;
297 return p->code <= ci->u.l.savedpc && 297 return p->code <= ci->u.l.savedpc &&