aboutsummaryrefslogtreecommitdiff
path: root/ltm.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-26 14:59:39 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-26 14:59:39 -0300
commitb80077b8f3e27a94c6afa895b41a9f8b52c42e61 (patch)
tree8a7c21ee0acfed553ef1d92bdfd7b1f728f35a91 /ltm.h
parente70f275f32a5339a86be6f8b9d08c20cb874b205 (diff)
downloadlua-b80077b8f3e27a94c6afa895b41a9f8b52c42e61.tar.gz
lua-b80077b8f3e27a94c6afa895b41a9f8b52c42e61.tar.bz2
lua-b80077b8f3e27a94c6afa895b41a9f8b52c42e61.zip
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'.)
Diffstat (limited to 'ltm.h')
-rw-r--r--ltm.h1
1 files changed, 1 insertions, 0 deletions
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,
75 const TValue *p1, const TValue *p2, StkId p3); 75 const TValue *p1, const TValue *p2, StkId p3);
76LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, 76LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
77 StkId res, TMS event); 77 StkId res, TMS event);
78LUAI_FUNC void luaT_tryconcatTM (lua_State *L);
78LUAI_FUNC void luaT_trybinassocTM (lua_State *L, const TValue *p1, 79LUAI_FUNC void luaT_trybinassocTM (lua_State *L, const TValue *p1,
79 const TValue *p2, StkId res, int inv, TMS event); 80 const TValue *p2, StkId res, int inv, TMS event);
80LUAI_FUNC void luaT_trybiniTM (lua_State *L, const TValue *p1, lua_Integer i2, 81LUAI_FUNC void luaT_trybiniTM (lua_State *L, const TValue *p1, lua_Integer i2,