aboutsummaryrefslogtreecommitdiff
path: root/lcode.h
diff options
context:
space:
mode:
authorRoberto I <roberto@inf.puc-rio.br>2025-11-08 11:43:42 -0300
committerRoberto I <roberto@inf.puc-rio.br>2025-11-08 11:43:42 -0300
commite44f3a2ffc7ced5e75cca7657aaa60ef27da89aa (patch)
tree090174ab9a66fbec195e9dd539710ab19370ec2f /lcode.h
parentf791bb69061c15f73395c5a95958ac18af5ef764 (diff)
downloadlua-e44f3a2ffc7ced5e75cca7657aaa60ef27da89aa.tar.gz
lua-e44f3a2ffc7ced5e75cca7657aaa60ef27da89aa.tar.bz2
lua-e44f3a2ffc7ced5e75cca7657aaa60ef27da89aa.zip
Global initialization checks name conflict
Initialization "global a = 10" raises an error if global 'a' is already defined, that is, it has a non-nil value.
Diffstat (limited to 'lcode.h')
-rw-r--r--lcode.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lcode.h b/lcode.h
index f6397a3c..09e5c802 100644
--- a/lcode.h
+++ b/lcode.h
@@ -68,6 +68,8 @@ LUAI_FUNC int luaK_codevABCk (FuncState *fs, OpCode o, int A, int B, int C,
68LUAI_FUNC int luaK_exp2const (FuncState *fs, const expdesc *e, TValue *v); 68LUAI_FUNC int luaK_exp2const (FuncState *fs, const expdesc *e, TValue *v);
69LUAI_FUNC void luaK_fixline (FuncState *fs, int line); 69LUAI_FUNC void luaK_fixline (FuncState *fs, int line);
70LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n); 70LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n);
71LUAI_FUNC void luaK_codecheckglobal (FuncState *fs, expdesc *var, int k,
72 int line);
71LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n); 73LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n);
72LUAI_FUNC void luaK_checkstack (FuncState *fs, int n); 74LUAI_FUNC void luaK_checkstack (FuncState *fs, int n);
73LUAI_FUNC void luaK_int (FuncState *fs, int reg, lua_Integer n); 75LUAI_FUNC void luaK_int (FuncState *fs, int reg, lua_Integer n);