diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-12-04 11:08:42 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-12-04 11:08:42 -0300 |
| commit | 23051e830a8b212f831443eb888e93e30fa8bb19 (patch) | |
| tree | 782f56415ad3a8799c4dea8d6d329f1550d3d7c3 /ltable.h | |
| parent | f15589f3b0da477e5dda8863cbf4c0b36469e36d (diff) | |
| download | lua-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.h | 8 |
1 files changed, 6 insertions, 2 deletions
| @@ -41,8 +41,12 @@ LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key, | |||
| 41 | LUAI_FUNC const TValue *luaH_getshortstr (Table *t, TString *key); | 41 | LUAI_FUNC const TValue *luaH_getshortstr (Table *t, TString *key); |
| 42 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); | 42 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); |
| 43 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); | 43 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); |
| 44 | LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key); | 44 | LUAI_FUNC void luaH_newkey (lua_State *L, Table *t, const TValue *key, |
| 45 | LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); | 45 | TValue *value); |
| 46 | LUAI_FUNC void luaH_set (lua_State *L, Table *t, const TValue *key, | ||
| 47 | TValue *value); | ||
| 48 | LUAI_FUNC void luaH_finishset (lua_State *L, Table *t, const TValue *key, | ||
| 49 | const TValue *slot, TValue *value); | ||
| 46 | LUAI_FUNC Table *luaH_new (lua_State *L); | 50 | LUAI_FUNC Table *luaH_new (lua_State *L); |
| 47 | LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize, | 51 | LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize, |
| 48 | unsigned int nhsize); | 52 | unsigned int nhsize); |
