summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-05-08 12:57:23 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-05-08 12:57:23 -0300
commitfb9de1b4d77494d55c6e0c3c8e5c681dad36b49e (patch)
treebcc9d62e57e93d31e7ef2e251bde8b585c0a8dc1
parente8757a73e64c351bdafb75ee45be60e7ab4b3426 (diff)
downloadlua-fb9de1b4d77494d55c6e0c3c8e5c681dad36b49e.tar.gz
lua-fb9de1b4d77494d55c6e0c3c8e5c681dad36b49e.tar.bz2
lua-fb9de1b4d77494d55c6e0c3c8e5c681dad36b49e.zip
detail ('luaT_callbinTM' does not need to be extern)
-rw-r--r--ltm.c10
-rw-r--r--ltm.h4
2 files changed, 6 insertions, 8 deletions
diff --git a/ltm.c b/ltm.c
index 47341384..0ef76313 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.c,v 2.38 2016/12/22 13:08:50 roberto Exp roberto $ 2** $Id: ltm.c,v 2.39 2017/04/11 18:41:09 roberto Exp roberto $
3** Tag methods 3** Tag methods
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -121,8 +121,8 @@ void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1,
121} 121}
122 122
123 123
124int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2, 124static int callbinTM (lua_State *L, const TValue *p1, const TValue *p2,
125 StkId res, TMS event) { 125 StkId res, TMS event) {
126 const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */ 126 const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */
127 if (ttisnil(tm)) 127 if (ttisnil(tm))
128 tm = luaT_gettmbyobj(L, p2, event); /* try second operand */ 128 tm = luaT_gettmbyobj(L, p2, event); /* try second operand */
@@ -134,7 +134,7 @@ int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2,
134 134
135void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, 135void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
136 StkId res, TMS event) { 136 StkId res, TMS event) {
137 if (!luaT_callbinTM(L, p1, p2, res, event)) { 137 if (!callbinTM(L, p1, p2, res, event)) {
138 switch (event) { 138 switch (event) {
139 case TM_CONCAT: 139 case TM_CONCAT:
140 luaG_concaterror(L, p1, p2); 140 luaG_concaterror(L, p1, p2);
@@ -157,7 +157,7 @@ void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
157 157
158int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, 158int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2,
159 TMS event) { 159 TMS event) {
160 if (!luaT_callbinTM(L, p1, p2, L->top, event)) 160 if (!callbinTM(L, p1, p2, L->top, event))
161 return -1; /* no metamethod */ 161 return -1; /* no metamethod */
162 else 162 else
163 return !l_isfalse(L->top); 163 return !l_isfalse(L->top);
diff --git a/ltm.h b/ltm.h
index 70569f82..535e1885 100644
--- a/ltm.h
+++ b/ltm.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.h,v 2.21 2014/10/25 11:50:46 roberto Exp roberto $ 2** $Id: ltm.h,v 2.22 2016/02/26 19:20:15 roberto Exp roberto $
3** Tag methods 3** Tag methods
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -64,8 +64,6 @@ LUAI_FUNC void luaT_init (lua_State *L);
64 64
65LUAI_FUNC void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1, 65LUAI_FUNC void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1,
66 const TValue *p2, TValue *p3, int hasres); 66 const TValue *p2, TValue *p3, int hasres);
67LUAI_FUNC int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2,
68 StkId res, TMS event);
69LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, 67LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
70 StkId res, TMS event); 68 StkId res, TMS event);
71LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1, 69LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1,