Refactoring of 'luaH_newkey'

Function broke in two and some checks moved to the caller. (We may
want to call it without the checks.)
This commit is contained in:
Roberto Ierusalimschy
2024-12-05 14:27:58 -03:00
parent 975d4e0592
commit bb93f04d87
2 changed files with 79 additions and 56 deletions

View File

@@ -750,10 +750,9 @@ typedef union Node {
/* copy a value into a key */
#define setnodekey(L,node,obj) \
#define setnodekey(node,obj) \
{ Node *n_=(node); const TValue *io_=(obj); \
n_->u.key_val = io_->value_; n_->u.key_tt = io_->tt_; \
checkliveness(L,io_); }
n_->u.key_val = io_->value_; n_->u.key_tt = io_->tt_; }
/* copy a value from a key */