From 23051e830a8b212f831443eb888e93e30fa8bb19 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 4 Dec 2020 11:08:42 -0300 Subject: Changes in the API of 'luaH_set' and related functions Functions to set values in a table (luaH_set, luaH_newkey, etc.) receive the new value, instead of returning a slot where to put the value. --- lapi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index 9fffcc16..03e756d6 100644 --- a/lapi.c +++ b/lapi.c @@ -871,12 +871,10 @@ LUA_API void lua_seti (lua_State *L, int idx, lua_Integer n) { static void aux_rawset (lua_State *L, int idx, TValue *key, int n) { Table *t; - TValue *slot; lua_lock(L); api_checknelems(L, n); t = gettable(L, idx); - slot = luaH_set(L, t, key); - setobj2t(L, slot, s2v(L->top - 1)); + luaH_set(L, t, key, s2v(L->top - 1)); invalidateTMcache(t); luaC_barrierback(L, obj2gco(t), s2v(L->top - 1)); L->top -= n; -- cgit v1.2.3-55-g6feb