aboutsummaryrefslogtreecommitdiff
path: root/ltable.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-12-04 11:08:42 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-12-04 11:08:42 -0300
commit23051e830a8b212f831443eb888e93e30fa8bb19 (patch)
tree782f56415ad3a8799c4dea8d6d329f1550d3d7c3 /ltable.h
parentf15589f3b0da477e5dda8863cbf4c0b36469e36d (diff)
downloadlua-23051e830a8b212f831443eb888e93e30fa8bb19.tar.gz
lua-23051e830a8b212f831443eb888e93e30fa8bb19.tar.bz2
lua-23051e830a8b212f831443eb888e93e30fa8bb19.zip
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.
Diffstat (limited to 'ltable.h')
-rw-r--r--ltable.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/ltable.h b/ltable.h
index c0060f4b..7bbbcb21 100644
--- a/ltable.h
+++ b/ltable.h
@@ -41,8 +41,12 @@ LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key,
41LUAI_FUNC const TValue *luaH_getshortstr (Table *t, TString *key); 41LUAI_FUNC const TValue *luaH_getshortstr (Table *t, TString *key);
42LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 42LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);
43LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 43LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);
44LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key); 44LUAI_FUNC void luaH_newkey (lua_State *L, Table *t, const TValue *key,
45LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); 45 TValue *value);
46LUAI_FUNC void luaH_set (lua_State *L, Table *t, const TValue *key,
47 TValue *value);
48LUAI_FUNC void luaH_finishset (lua_State *L, Table *t, const TValue *key,
49 const TValue *slot, TValue *value);
46LUAI_FUNC Table *luaH_new (lua_State *L); 50LUAI_FUNC Table *luaH_new (lua_State *L);
47LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize, 51LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize,
48 unsigned int nhsize); 52 unsigned int nhsize);