Renamed Lua's getline so it doesn't conflict with the real one
This commit is contained in:
parent
f0ec3f451e
commit
b81d8c9cfb
@ -4,11 +4,6 @@ AC_DEFUN([UGLY_FAKE_FUN],[
|
||||
7a7f11d6c077a99463a4fbefe1c09a20 moo-os.m4
|
||||
bf3d04c32399bca1bbe75282947e1041 moo-version.m4
|
||||
5e18022b42d6f056ef24b748181c848b ugly.m4
|
||||
f3434833becc2338bc7ce8ff0a925987 libtool.m4
|
||||
152941207b2a2348e1687f6d9430fdd4 ltoptions.m4
|
||||
bc2f6032c98896249eadb56177c7d357 ltsugar.m4
|
||||
8ad9271cd6f868874ffff4223e2ff0ee ltversion.m4
|
||||
13eeb5a2026d18ffe6428827fc7ab406 lt~obsolete.m4
|
||||
7e6e4832fed0fed1850ee168e65d9d4f moo-comps.m4
|
||||
ab00dc3cc5a6899ecd789fa5d5070abd moo-debug.m4
|
||||
d86d9c0fc3a7e74d0cad083d0b7fee15 moo-dirs.m4
|
||||
|
2
moo.mprj
2
moo.mprj
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<medit-project version="2.0" type="C" name="moo">
|
||||
<active>debug</active>
|
||||
<active>optimized</active>
|
||||
<configurations>
|
||||
<configuration name="debug">
|
||||
<build_dir>build/debug</build_dir>
|
||||
|
@ -46,7 +46,7 @@ static int currentline (lua_State *L, CallInfo *ci) {
|
||||
if (pc < 0)
|
||||
return -1; /* only active lua functions have current-line information */
|
||||
else
|
||||
return getline(ci_func(ci)->l.p, pc);
|
||||
return lua_getline_(ci_func(ci)->l.p, pc);
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1)
|
||||
|
||||
#define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
|
||||
#define lua_getline_(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
|
||||
|
||||
#define resethookcount(L) (L->hookcount = L->basehookcount)
|
||||
|
||||
|
@ -68,10 +68,10 @@ static void traceexec (lua_State *L, const Instruction *pc) {
|
||||
if (mask & LUA_MASKLINE) {
|
||||
Proto *p = ci_func(L->ci)->l.p;
|
||||
int npc = pcRel(pc, p);
|
||||
int newline = getline(p, npc);
|
||||
int newline = lua_getline_(p, npc);
|
||||
/* call linehook when enter a new function, when jump back (loop),
|
||||
or when enter a new line */
|
||||
if (npc == 0 || pc <= oldpc || newline != getline(p, pcRel(oldpc, p)))
|
||||
if (npc == 0 || pc <= oldpc || newline != lua_getline_(p, pcRel(oldpc, p)))
|
||||
luaD_callhook(L, LUA_HOOKLINE, newline);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user