2
0
Эх сурвалжийг харах

'ci_func' don't need to be exported

Roberto Ierusalimschy 10 жил өмнө
parent
commit
0cf3b6495a
3 өөрчлөгдсөн 8 нэмэгдсэн , 7 устгасан
  1. 5 1
      ldebug.c
  2. 1 4
      ldebug.h
  3. 2 2
      ltests.c

+ 5 - 1
ldebug.c

@@ -1,5 +1,5 @@
 /*
-** $Id: ldebug.c,v 2.111 2015/02/13 16:01:17 roberto Exp roberto $
+** $Id: ldebug.c,v 2.112 2015/03/06 19:49:50 roberto Exp roberto $
 ** Debug Interface
 ** See Copyright Notice in lua.h
 */
@@ -34,6 +34,10 @@
 #define noLuaClosure(f)		((f) == NULL || (f)->c.tt == LUA_TCCL)
 
 
+/* Active Lua function (given call info) */
+#define ci_func(ci)		(clLvalue((ci)->func))
+
+
 static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name);
 
 

+ 1 - 4
ldebug.h

@@ -1,5 +1,5 @@
 /*
-** $Id: ldebug.h,v 2.11 2014/02/25 14:31:16 roberto Exp roberto $
+** $Id: ldebug.h,v 2.12 2014/11/10 14:46:05 roberto Exp roberto $
 ** Auxiliary functions from Debug Interface module
 ** See Copyright Notice in lua.h
 */
@@ -17,9 +17,6 @@
 
 #define resethookcount(L)	(L->hookcount = L->basehookcount)
 
-/* Active Lua function (given call info) */
-#define ci_func(ci)		(clLvalue((ci)->func))
-
 
 LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
                                                 const char *opname);

+ 2 - 2
ltests.c

@@ -1,5 +1,5 @@
 /*
-** $Id: ltests.c,v 2.201 2014/12/18 12:13:42 roberto Exp roberto $
+** $Id: ltests.c,v 2.202 2015/01/16 16:54:37 roberto Exp roberto $
 ** Internal Module for Debugging of the Lua Implementation
 ** See Copyright Notice in lua.h
 */
@@ -291,7 +291,7 @@ static int lua_checkpc (lua_State *L, CallInfo *ci) {
   else {
     Proto *p;
     if (L->status != LUA_YIELD || ci != L->ci)
-      p = ci_func(ci)->p;
+      p = clLvalue(ci->func)->p;
     else  /* real 'func' was saved in 'extra' field */
       p = clLvalue(restorestack(L, ci->extra))->p;
     return p->code <= ci->u.l.savedpc &&