diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-10-26 12:21:56 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-10-26 12:21:56 -0200 |
commit | 15d48576ea737d51e579f101a870e37f62b81f22 (patch) | |
tree | ed2390188cfb5304d366696262ccda593f3e8589 /opcode.c | |
parent | 39b071f7b13e6ed6eff4a0f0471d2450a9c48084 (diff) | |
download | lua-github-15d48576ea737d51e579f101a870e37f62b81f22.tar.gz |
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.
Diffstat (limited to 'opcode.c')
-rw-r--r-- | opcode.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -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) |