From b80077b8f3e27a94c6afa895b41a9f8b52c42e61 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 26 Jul 2019 14:59:39 -0300 Subject: Change in the handling of 'L->top' when calling metamethods Instead of updating 'L->top' in every place that may call a metamethod, the metamethod functions themselves (luaT_trybinTM and luaT_callorderTM) correct the top. (When calling metamethods from the C API, however, the callers must preserve 'L->top'.) --- ltm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ltm.h') diff --git a/ltm.h b/ltm.h index e308fb80..51dfe793 100644 --- a/ltm.h +++ b/ltm.h @@ -75,6 +75,7 @@ LUAI_FUNC void luaT_callTMres (lua_State *L, const TValue *f, const TValue *p1, const TValue *p2, StkId p3); LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, StkId res, TMS event); +LUAI_FUNC void luaT_tryconcatTM (lua_State *L); LUAI_FUNC void luaT_trybinassocTM (lua_State *L, const TValue *p1, const TValue *p2, StkId res, int inv, TMS event); LUAI_FUNC void luaT_trybiniTM (lua_State *L, const TValue *p1, lua_Integer i2, -- cgit v1.2.3-55-g6feb