aboutsummaryrefslogtreecommitdiff
path: root/lparser.h
diff options
context:
space:
mode:
authorRoberto I <roberto@inf.puc-rio.br>2026-04-23 17:57:42 -0300
committerRoberto I <roberto@inf.puc-rio.br>2026-04-23 17:57:42 -0300
commit3228a97c6a953dcf397944161bb64b12f1ff5384 (patch)
tree6497f6f8e93ba3bb381c0b48aed71646fca3f9b0 /lparser.h
parent0c16a42d61d08266033ff63bc5dfade6312b7359 (diff)
downloadlua-3228a97c6a953dcf397944161bb64b12f1ff5384.tar.gz
lua-3228a97c6a953dcf397944161bb64b12f1ff5384.tar.bz2
lua-3228a97c6a953dcf397944161bb64b12f1ff5384.zip
Bug: 'lua_load' does not preserve the stack
'lua_load' does not preserve the stack through the calls to the reader function, as it should. Immediately after the first call (to detect whether chunk is binary) it adds stuff, and it also adds a new table when starting the compilation of each new function.
Diffstat (limited to 'lparser.h')
-rw-r--r--lparser.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lparser.h b/lparser.h
index a30df04f..4fad6bdc 100644
--- a/lparser.h
+++ b/lparser.h
@@ -189,8 +189,9 @@ typedef struct FuncState {
189LUAI_FUNC lu_byte luaY_nvarstack (FuncState *fs); 189LUAI_FUNC lu_byte luaY_nvarstack (FuncState *fs);
190LUAI_FUNC void luaY_checklimit (FuncState *fs, int v, int l, 190LUAI_FUNC void luaY_checklimit (FuncState *fs, int v, int l,
191 const char *what); 191 const char *what);
192LUAI_FUNC LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, 192LUAI_FUNC LClosure *luaY_parser (lua_State *L, ZIO *z, Table *anchor,
193 Dyndata *dyd, const char *name, int firstchar); 193 Mbuffer *buff, Dyndata *dyd,
194 const char *name, int firstchar);
194 195
195 196
196#endif 197#endif