mirror of https://github.com/rusefi/lua.git
detail ('luaT_callbinTM' does not need to be extern)
This commit is contained in:
parent
e8757a73e6
commit
fb9de1b4d7
10
ltm.c
10
ltm.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ltm.c,v 2.38 2016/12/22 13:08:50 roberto Exp roberto $
|
** $Id: ltm.c,v 2.39 2017/04/11 18:41:09 roberto Exp roberto $
|
||||||
** Tag methods
|
** Tag methods
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -121,8 +121,8 @@ void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2,
|
static int callbinTM (lua_State *L, const TValue *p1, const TValue *p2,
|
||||||
StkId res, TMS event) {
|
StkId res, TMS event) {
|
||||||
const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */
|
const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */
|
||||||
if (ttisnil(tm))
|
if (ttisnil(tm))
|
||||||
tm = luaT_gettmbyobj(L, p2, event); /* try second operand */
|
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,
|
||||||
|
|
||||||
void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
|
void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
|
||||||
StkId res, TMS event) {
|
StkId res, TMS event) {
|
||||||
if (!luaT_callbinTM(L, p1, p2, res, event)) {
|
if (!callbinTM(L, p1, p2, res, event)) {
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case TM_CONCAT:
|
case TM_CONCAT:
|
||||||
luaG_concaterror(L, p1, p2);
|
luaG_concaterror(L, p1, p2);
|
||||||
|
@ -157,7 +157,7 @@ void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
|
||||||
|
|
||||||
int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2,
|
int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2,
|
||||||
TMS event) {
|
TMS event) {
|
||||||
if (!luaT_callbinTM(L, p1, p2, L->top, event))
|
if (!callbinTM(L, p1, p2, L->top, event))
|
||||||
return -1; /* no metamethod */
|
return -1; /* no metamethod */
|
||||||
else
|
else
|
||||||
return !l_isfalse(L->top);
|
return !l_isfalse(L->top);
|
||||||
|
|
4
ltm.h
4
ltm.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ltm.h,v 2.21 2014/10/25 11:50:46 roberto Exp roberto $
|
** $Id: ltm.h,v 2.22 2016/02/26 19:20:15 roberto Exp roberto $
|
||||||
** Tag methods
|
** Tag methods
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -64,8 +64,6 @@ LUAI_FUNC void luaT_init (lua_State *L);
|
||||||
|
|
||||||
LUAI_FUNC void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1,
|
LUAI_FUNC void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1,
|
||||||
const TValue *p2, TValue *p3, int hasres);
|
const TValue *p2, TValue *p3, int hasres);
|
||||||
LUAI_FUNC int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2,
|
|
||||||
StkId res, TMS event);
|
|
||||||
LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
|
LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
|
||||||
StkId res, TMS event);
|
StkId res, TMS event);
|
||||||
LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1,
|
LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1,
|
||||||
|
|
Loading…
Reference in New Issue