aboutsummaryrefslogtreecommitdiff
path: root/ltable.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-12-17 11:23:22 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-12-17 11:23:22 -0300
commit1c40ff9faafed620aa0458b397bcbfbe19e0f663 (patch)
treeedfb96022feb99244a7a6c4c9d28525e141b783e /ltable.h
parent7538f3886dfa091d661c56e48ebb1578ced8e467 (diff)
downloadlua-1c40ff9faafed620aa0458b397bcbfbe19e0f663.tar.gz
lua-1c40ff9faafed620aa0458b397bcbfbe19e0f663.tar.bz2
lua-1c40ff9faafed620aa0458b397bcbfbe19e0f663.zip
Scanner and parser use different tables for constants
Moreover, each function being parsed has its own table. The code is cleaner when each table is used for one specific purpose: The scanner uses its table to anchor and unify strings, mapping strings to themselves; the parser uses it to reuse constants in the code, mapping constants to their indices in the constant table. A different table for each task avoids false collisions.
Diffstat (limited to 'ltable.h')
-rw-r--r--ltable.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/ltable.h b/ltable.h
index e4aa98f0..ca21e692 100644
--- a/ltable.h
+++ b/ltable.h
@@ -154,8 +154,6 @@ LUAI_FUNC lu_byte luaH_getint (Table *t, lua_Integer key, TValue *res);
154/* Special get for metamethods */ 154/* Special get for metamethods */
155LUAI_FUNC const TValue *luaH_Hgetshortstr (Table *t, TString *key); 155LUAI_FUNC const TValue *luaH_Hgetshortstr (Table *t, TString *key);
156 156
157LUAI_FUNC TString *luaH_getstrkey (Table *t, TString *key);
158
159LUAI_FUNC int luaH_psetint (Table *t, lua_Integer key, TValue *val); 157LUAI_FUNC int luaH_psetint (Table *t, lua_Integer key, TValue *val);
160LUAI_FUNC int luaH_psetshortstr (Table *t, TString *key, TValue *val); 158LUAI_FUNC int luaH_psetshortstr (Table *t, TString *key, TValue *val);
161LUAI_FUNC int luaH_psetstr (Table *t, TString *key, TValue *val); 159LUAI_FUNC int luaH_psetstr (Table *t, TString *key, TValue *val);