summaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-26 11:16:05 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-26 11:16:05 -0300
commitef8263f81fdde2310ebb15c9a3fe5e954d57cab5 (patch)
tree8532d24bcfc4c59212616bdae1b25f087f1eb179 /ltable.c
parent2952bc5fc9cdc05ed061539cb7be26899513f004 (diff)
downloadlua-github-ef8263f81fdde2310ebb15c9a3fe5e954d57cab5.tar.gz
better names for macros for tags and types.
rttype -> rawtt; ttyperaw -> withvariant; ttype -> ttypetag; tnov -> ttype
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ltable.c b/ltable.c
index c71d627a..be8f67f0 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
/*
-** $Id: ltable.c,v 2.133 2018/02/21 12:54:26 roberto Exp roberto $
+** $Id: ltable.c,v 2.134 2018/02/23 13:13:31 roberto Exp roberto $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -133,7 +133,7 @@ static int l_hashfloat (lua_Number n) {
** nodes.
*/
static Node *mainposition (const Table *t, int ktt, const Value *kvl) {
- switch (ttyperaw(ktt)) {
+ switch (withvariant(ktt)) {
case LUA_TNUMINT:
return hashint(t, ivalueraw(*kvl));
case LUA_TNUMFLT:
@@ -155,7 +155,7 @@ static Node *mainposition (const Table *t, int ktt, const Value *kvl) {
static Node *mainpositionTV (const Table *t, const TValue *key) {
- return mainposition(t, rttype(key), valraw(key));
+ return mainposition(t, rawtt(key), valraw(key));
}
@@ -168,9 +168,9 @@ static Node *mainpositionTV (const Table *t, const TValue *key) {
** default case.
*/
static int equalkey (const TValue *k1, const Node *n2) {
- if (rttype(k1) != keytt(n2)) /* not the same variants? */
+ if (rawtt(k1) != keytt(n2)) /* not the same variants? */
return 0; /* cannot be same key */
- switch (ttype(k1)) {
+ switch (ttypetag(k1)) {
case LUA_TNIL:
return 1;
case LUA_TNUMINT:
@@ -667,7 +667,7 @@ const TValue *luaH_getstr (Table *t, TString *key) {
** main search function
*/
const TValue *luaH_get (Table *t, const TValue *key) {
- switch (ttype(key)) {
+ switch (ttypetag(key)) {
case LUA_TSHRSTR: return luaH_getshortstr(t, tsvalue(key));
case LUA_TNUMINT: return luaH_getint(t, ivalue(key));
case LUA_TNIL: return luaH_emptyobject;