functions now may be declared with any "var" as a name;

therefore they do not have a "baptism" name.
Changes in debug API to acomodate that.
This commit is contained in:
Roberto Ierusalimschy
1995-10-26 12:21:56 -02:00
parent 39b071f7b1
commit 15d48576ea
8 changed files with 140 additions and 127 deletions

View File

@@ -3,7 +3,7 @@
** TecCGraf - PUC-Rio
*/
char *rcs_opcode="$Id: opcode.c,v 3.46 1995/10/17 14:30:05 roberto Exp roberto $";
char *rcs_opcode="$Id: opcode.c,v 3.47 1995/10/25 13:05:51 roberto Exp roberto $";
#include <setjmp.h>
#include <stdlib.h>
@@ -355,17 +355,13 @@ lua_Object lua_stackedfunction (int level)
}
void lua_funcinfo (lua_Object func, char **filename, char **funcname,
char **objname, int *line)
int lua_currentline (lua_Object func)
{
Object *f = Address(func);
luaI_funcInfo(f, filename, funcname, objname, line);
*line = (f+1 < top && (f+1)->tag == LUA_T_LINE) ?
(f+1)->value.i : -1;
return (f+1 < top && (f+1)->tag == LUA_T_LINE) ? (f+1)->value.i : -1;
}
/*
** Execute a protected call. Assumes that function is at CBase and
** parameters are on top of it. Leave nResults on the stack.
@@ -406,7 +402,6 @@ static int do_protectedmain (void)
stack[CBase].tag = LUA_T_FUNCTION;
stack[CBase].value.tf = &tf;
tf.lineDefined = 0;
tf.name1 = tf.name2 = NULL;
tf.fileName = lua_parsedfile;
tf.code = NULL;
if (setjmp(myErrorJmp) == 0)