diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-06-19 14:46:12 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-06-19 14:46:12 -0300 |
commit | a38f093f0540bce0207bb2dc27f1779f41c6d48b (patch) | |
tree | 56312ef7e5a3704a55257e358f599a56914cdf39 | |
parent | b6adfdd01be0e436e9627a1d712ff8e0d53a244d (diff) | |
download | lua-a38f093f0540bce0207bb2dc27f1779f41c6d48b.tar.gz lua-a38f093f0540bce0207bb2dc27f1779f41c6d48b.tar.bz2 lua-a38f093f0540bce0207bb2dc27f1779f41c6d48b.zip |
luaI_initTFunc initializes fileName.
-rw-r--r-- | func.c | 3 | ||||
-rw-r--r-- | lua.stx | 3 | ||||
-rw-r--r-- | opcode.c | 3 |
3 files changed, 4 insertions, 5 deletions
@@ -5,6 +5,7 @@ | |||
5 | #include "luamem.h" | 5 | #include "luamem.h" |
6 | #include "func.h" | 6 | #include "func.h" |
7 | #include "opcode.h" | 7 | #include "opcode.h" |
8 | #include "inout.h" | ||
8 | 9 | ||
9 | 10 | ||
10 | static TFunc *function_root = NULL; | 11 | static TFunc *function_root = NULL; |
@@ -23,7 +24,7 @@ void luaI_initTFunc (TFunc *f) | |||
23 | f->size = 0; | 24 | f->size = 0; |
24 | f->code = NULL; | 25 | f->code = NULL; |
25 | f->lineDefined = 0; | 26 | f->lineDefined = 0; |
26 | f->fileName = NULL; | 27 | f->fileName = lua_parsedfile; |
27 | f->locvars = NULL; | 28 | f->locvars = NULL; |
28 | } | 29 | } |
29 | 30 | ||
@@ -1,6 +1,6 @@ | |||
1 | %{ | 1 | %{ |
2 | 2 | ||
3 | char *rcs_luastx = "$Id: lua.stx,v 3.45 1997/03/06 17:30:55 roberto Exp roberto $"; | 3 | char *rcs_luastx = "$Id: lua.stx,v 3.46 1997/03/31 14:19:01 roberto Exp roberto $"; |
4 | 4 | ||
5 | #include <stdio.h> | 5 | #include <stdio.h> |
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
@@ -489,7 +489,6 @@ body : '(' parlist ')' block END | |||
489 | luaI_initTFunc($$); | 489 | luaI_initTFunc($$); |
490 | $$->size = pc; | 490 | $$->size = pc; |
491 | $$->code = newvector(pc, Byte); | 491 | $$->code = newvector(pc, Byte); |
492 | $$->fileName = lua_parsedfile; | ||
493 | $$->lineDefined = $2; | 492 | $$->lineDefined = $2; |
494 | memcpy($$->code, basepc, pc*sizeof(Byte)); | 493 | memcpy($$->code, basepc, pc*sizeof(Byte)); |
495 | if (lua_debug) | 494 | if (lua_debug) |
@@ -3,7 +3,7 @@ | |||
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_opcode="$Id: opcode.c,v 4.10 1997/06/16 18:42:32 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 4.11 1997/06/16 19:48:18 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
9 | #include <stdio.h> | 9 | #include <stdio.h> |
@@ -604,7 +604,6 @@ int lua_domain (void) | |||
604 | jmp_buf *oldErr = errorJmp; | 604 | jmp_buf *oldErr = errorJmp; |
605 | errorJmp = &myErrorJmp; | 605 | errorJmp = &myErrorJmp; |
606 | luaI_initTFunc(&tf); | 606 | luaI_initTFunc(&tf); |
607 | tf.fileName = lua_parsedfile; | ||
608 | if (setjmp(myErrorJmp) == 0) { | 607 | if (setjmp(myErrorJmp) == 0) { |
609 | lua_parse(&tf); | 608 | lua_parse(&tf); |
610 | status = 0; | 609 | status = 0; |